summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/Transform.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add clamp to Layer and update Transform inverse.Michael Lentine2014-11-211-15/+16
| | | | | | | | | | Ensure that the adjusted transparent region is within the display bounds by clamping after the transformation is applied and clean up transform's inverse function. Bug: 18452546 Change-Id: Ia473e483ee8374177bcb84d8192eb1f0e86f022a
* color blindness enhancementMathias Agopian2013-09-041-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | This is an attempt at improving the experience of users with color vision impairement. At this time this feature can only be enabled for debugging: adb shell service call SurfaceFlinger 1014 i32 PARAM with PARAM: 0 : disabled 1 : protanomaly/protanopia simulation 2 : deuteranomaly/deuteranopia simulation 3 : tritanopia/tritanomaly simulation 11, 12, 13: same as above w/ attempted correction/enhancement The enhancement algorithm tries to spread the "error" such that tones that would otherwise appear similar can be distinguished. Bug: 9465644 Change-Id: I860f7eed0cb81f54ef9cf24ad78155b6395ade48
* implement display projection clipping in h/w composerMathias Agopian2013-02-281-0/+38
| | | | | | | | | - cropping to the projection's "viewport" is "simply" accomplished by intersecting it with the window crop expressed in layerstack space. Bug: 7149437 Change-Id: I0e90b3f37945292314b5d78a8f134935967e8053
* Ensure that viewport and frame are initialized.Jeff Brown2012-09-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | onInitializeDisplays() was posting a transaction with changes to the display projection. Unfortunately, it only set the display orientation field and left viewport and frame uninitialized. The uninitialized values flowed downstream and found themselves baked into a bogus DisplayDevice mGlobalTransform. That transform was then applied to some Rects which were turned into Regions that were them combined with other Regions. Under certain situations, the uninitialized data might have a largish value, resulting in the creation of Regions with components in excess of the Region max-value limit of 0x7ffffff (note that this is not INT_MAX). Later when performing a binary operation using the Region, the Spanner would loop indefinitely trying to figure out how to stuff a humongous region inside of a max-value region. Not content to try just once, the Spanner would continue trying again and again, pegging the CPU and hanging surface flinger during boot. Insanity soon followed. Bug: 7130713 Change-Id: I0016f0c9662185be833474c212a1dd408096ae23
* Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-031-4/+4
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
* fix Surface positions are not floatsMathias Agopian2011-08-301-5/+7
| | | | | | | | Added Surface.setPosition(float, float) which allows to set a surface's position in float. Bug: 5239859 Change-Id: I903aef4ad5b5999142202fb8ea30fe216d805711
* fix a typo that prevented preserveRects() to work properlyMathias Agopian2011-07-251-1/+1
| | | | | | | this caused drawing artifacts during the screen rotation animation of SurfaceView. Change-Id: Idcc996b6ca2e346135dd2264959670c0b086d4cb
* implement: "Add an ANativeWindow API for SurfaceFlinger to suggest an ↵Mathias Agopian2011-07-191-36/+1
| | | | | | | optimal buffer orientation" Bug: 4487161 Change-Id: I883f34efe542c2a566d04966f873374f40c50092
* take the state transform into account with h/w composer halMathias Agopian2011-07-121-0/+1
| | | | | | | | | | if the state transform didn't preserve rectangles, we would still try to use h/w composer hal using the bounds of the transformed rect, which isn't correct. now we correctly fall back to composition. Change-Id: Iff78f4339ece415d4987e95a5717b04934d370ab
* really fix [3118445] Transform * Transform does not work as expectedMathias Agopian2010-10-271-11/+31
| | | | | | | | Two bugs were counter acting each other. - rotation matrices are on the left-hand side of multiplies - the transform of the overlay is applied before that of the layer Change-Id: Ia79bd368e9b719235c89ecf244ea263f01ce906a
* fix [3118445] Transform * Transform does not work as expectedMathias Agopian2010-10-241-42/+18
| | | | | | | | | | | | The problem wasn't in the multiply operator, but rather in the code that built the transform from the HAL bitmask. We now use the multiply operator to build the Transform from the bitmask, which guarantees, it'll always be correct. Also added a simple test for Transform. Change-Id: I09bf3b0e51d92f59d83ea91c4cc94fc2aa0bf227
* move native services under services/Mathias Agopian2010-07-141-0/+391
moved surfaceflinger, audioflinger, cameraservice all native services should now reside in this location. Change-Id: Iee42b83dd2a94c3bf5107ab0895fe2dfcd5337a8