summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger
Commit message (Collapse)AuthorAgeFilesLines
* Force a repaint when hwc invalidate hook is calledMathias Agopian2011-10-052-6/+4
| | | | | | | without this prepare() would be called but not set() since the dirty region is empty. Change-Id: I038acfbdad4c16015357ccde4d1949391d6f989d
* improve hwc log outputMathias Agopian2011-09-291-5/+5
| | | | | | we now print the handle of each buffer Change-Id: I70884ae458a9dcf10cfc403258d48eaa4618b7f4
* Merge changes Ib302d79e,Ib4ee085fJamie Gennis2011-09-273-1/+7
|\ | | | | | | | | | | * changes: SurfaceFlinger: set layer names on SurfaceTextures SurfaceTexture: add name support
| * SurfaceFlinger: set layer names on SurfaceTexturesJamie Gennis2011-09-223-1/+7
| | | | | | | | | | | | | | This change sets the SurfaceTexture name string to match that of the layer to which it belongs. Change-Id: Ib302d79e916a36ab1e54cb9ff477c3b857bd957b
* | am da42e0fa: Merge "SurfaceFlinger: fix setting default buffer size" into ↵Jamie Gennis2011-09-271-4/+5
|\ \ | | | | | | | | | | | | | | | | | | ics-factoryrom * commit 'da42e0faaa95c796dc49f3b38023562dab6584a7': SurfaceFlinger: fix setting default buffer size
| * \ Merge "SurfaceFlinger: fix setting default buffer size" into ics-factoryromJamie Gennis2011-09-271-4/+5
| |\ \
| | * | SurfaceFlinger: fix setting default buffer sizeJamie Gennis2011-09-261-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes SurfaceFlinger update a SurfaceTextureLayer's default buffer size in response to a window resize even if the Layer is in fixed size mode. Change-Id: I3871c8f19a045d03904d1284390cad7659be71ff Bug: 5366426
| * | | don't clear the framebuffer when the framebuffer is not usedMathias Agopian2011-09-261-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when areas of the FB are undefined (transparent windows on top of nothing), we clear those areas before composition. however, it makes no sense to do this when the FB is not in use (case where hwc handles all layers) Bug: 5360529 Change-Id: I761a7d3664228ebbee0944aca8b0cc278fc94c9c
| * | | Merge "(DO NOT MERGE) SurfaceFlinger: fix isOpaque check in lockPageFlip" ↵Jamie Gennis2011-09-261-10/+10
| |\ \ \ | | | | | | | | | | | | | | | into ics-factoryrom
| | * | | (DO NOT MERGE) SurfaceFlinger: fix isOpaque check in lockPageFlipJamie Gennis2011-09-161-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes an issue where Layer::isOpaque was being called in lockPageFlip to get the opaqueness for the new buffer before mActiveBuffer was updated. Bug: 5321313 Change-Id: Ibb5d7d3f4e9a2b1448e117a484a0d9f9ca5fc9de
* | | | | am 3780d380: Merge "SurfaceFlinger: fix the transform hint" into ics-factoryromJamie Gennis2011-09-263-1/+5
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit '3780d38010f50ccce508871058d54c1921936e0c': SurfaceFlinger: fix the transform hint
| * | | | SurfaceFlinger: fix the transform hintJamie Gennis2011-09-243-1/+5
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes the transform hint to use only the global display transform rather than incorporating the transient layer-specific transform used during animations. Bug: 5366891 Change-Id: I5408dcd3f4771d010953e8a696a484c835bfe81e
| * | | fix transition from full overlays to fbMathias Agopian2011-09-205-48/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we need to clear the whole framebuffer in that situation because we can't trust the content of the FB when partial (fb preserving) updates are used. Bug: 5318492 Change-Id: I3f0e01b0fb665a34e44d88ad9f0f54a5d990060b
| * | | rename mInvalidRegion to mSwapRegionMathias Agopian2011-09-202-11/+11
| | | | | | | | | | | | | | | | Change-Id: I946cbc782c0c84645843ea44c3d8b04a0a2fe658
| * | | improve hwc dumpsysMathias Agopian2011-09-204-6/+21
| |/ / | | | | | | | | | | | | | | | we now log the buffer's format Change-Id: I9d3ad8018e884240a153de3baefb6331cb014d0f
* | | Merge "don't clear the framebuffer when the framebuffer is not used"Mathias Agopian2011-09-221-5/+6
|\ \ \
| * | | don't clear the framebuffer when the framebuffer is not usedMathias Agopian2011-09-221-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when areas of the FB are undefined (transparent windows on top of nothing), we clear those areas before composition. however, it makes no sense to do this when the FB is not in use (case where hwc handles all layers) Bug: 5360529 Change-Id: If51bb669307e8419bbe1f3a89d1c88e0ec1f216c
* | | | Merge "fix dumpsys wording for h/w composer"Mathias Agopian2011-09-221-1/+1
|\ \ \ \ | |/ / / | | | / | |_|/ |/| |
| * | fix dumpsys wording for h/w composerMathias Agopian2011-09-221-1/+1
| | | | | | | | | | | | Change-Id: Iaa1094964f2fb83da491e23b9309f7690079c17e
* | | Handle orientation changes more systematically.Jeff Brown2011-09-212-3/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 4981385 Simplify the orientation changing code path in the WindowManager. Instead of the policy calling setRotation() when the sensor determined orientation changes, it calls updateRotation(), which figures everything out. For the most part, the rotation actually passed to setRotation() was more or less ignored and just added confusion, particularly when handling deferred orientation changes. Ensure that 180 degree rotations are disallowed even when the application specifies SCREEN_ORIENTATION_SENSOR_*. These rotations are only enabled when docked upside-down for some reason or when the application specifies SCREEN_ORIENTATION_FULL_SENSOR. Ensure that special modes like HDMI connected, lid switch, dock and rotation lock all cause the sensor to be ignored even when the application asks for sensor-based orientation changes. The sensor is not relevant in these modes because some external factor (or the user) is determining the preferred rotation. Currently, applications can still override the preferred rotation even when there are special modes in play that might say otherwise. We could tweak this so that some special modes trump application choices completely (resulting in a letter-boxed application, perhaps). I tested this sort of tweak (not included in the patch) and it seems to work fine, including transitions between applications with varying orientation. Delete dead code related to animFlags. Handle pausing/resuming orientation changes more precisely. Ensure that a deferred orientation change is performed when a drag completes, even if endDragLw() is not called because the drag was aborted before the drop happened. We pause the orientation change in register() and resume in unregister() because those methods appear to always be called as needed. Change-Id: If0a31de3d057251e581fdee64819f2b19e676e9a
* | fix transition from full overlays to fbMathias Agopian2011-09-205-48/+90
| | | | | | | | | | | | | | | | | | | | we need to clear the whole framebuffer in that situation because we can't trust the content of the FB when partial (fb preserving) updates are used. Bug: 5318492 Change-Id: I3f0e01b0fb665a34e44d88ad9f0f54a5d990060b
* | rename mInvalidRegion to mSwapRegionMathias Agopian2011-09-202-11/+11
| | | | | | | | Change-Id: I946cbc782c0c84645843ea44c3d8b04a0a2fe658
* | improve hwc dumpsysMathias Agopian2011-09-204-6/+21
| | | | | | | | | | | | we now log the buffer's format Change-Id: I9d3ad8018e884240a153de3baefb6331cb014d0f
* | SurfaceFlinger: fix isOpaque check in lockPageFlipJamie Gennis2011-09-141-10/+10
|/ | | | | | | | | This change fixes an issue where Layer::isOpaque was being called in lockPageFlip to get the opaqueness for the new buffer before mActiveBuffer was updated. Bug: 5321313 Change-Id: Ibb5d7d3f4e9a2b1448e117a484a0d9f9ca5fc9de
* Fix another problem with refreshing the screen when switching to/from overlayMathias Agopian2011-09-093-21/+36
| | | | | | | the previous fix was incorrect. See comment in setupHardwareComposer for full explanations. Change-Id: Ib24a9af000b8f95cf7319f9272d34997064ceb6d
* Improve SF dumpsys output wrt HWCMathias Agopian2011-09-094-9/+15
| | | | Change-Id: Ibdb7930fa3b521bfd3f44750ed98cfd75f9a01fe
* Fix an issue is SF that caused drawing artifacts when hwc changed modeMathias Agopian2011-09-084-60/+85
| | | | | | | | | | | | we were not redrawing and/or clearing the FB properly when hwc moved a layer from/to FB to/from OVERLAY. In these cases we needed to expand the dirty region to include the layer that changed mode. Also split composeSurfaces() which was becoming quite large. Change-Id: Id6fa1acfc4ff694037fddf7efd037a4405732073
* fix a bug that caused the off animation to not show sometimesMathias Agopian2011-09-023-2/+24
| | | | | | | | | this happened when the overlays were in use, since the animation is rendered in the FB and the FB is not used. we now have a way to turn hwc off temporarily. Change-Id: I3385f0c25bb9cc91948e7b26e7cd31ed18c36ace
* Fix various flickering / artifactsMathias Agopian2011-09-011-0/+14
| | | | | | | | | | these were due to the "preserve backbuffer" optimization interfering with hw composer. basically the screen needed to be redrawn in the areas that move from GL to overlay. Bug: 5245513 Change-Id: I9bf75c4fe905f3ef62005e52108b94edae692304
* Merge "fix Surface positions are not floats"Mathias Agopian2011-08-304-18/+13
|\
| * fix Surface positions are not floatsMathias Agopian2011-08-304-18/+13
| | | | | | | | | | | | | | | | Added Surface.setPosition(float, float) which allows to set a surface's position in float. Bug: 5239859 Change-Id: I903aef4ad5b5999142202fb8ea30fe216d805711
* | fix display artifacts in preview screen in timelapse video modeMathias Agopian2011-08-302-23/+39
|/ | | | | | | | | | | | | | | | | We were not updating the h/w composer state when the buffer size changed. We also didn't update the h/w composer state when the transformation matrix changed (which is related to the above issue, since it would probably change when the buffer size changes). Also moved updating the crop to setGeometry(), since we decided that the "crop" change requires the GEOMETRY_CHANGED flag (ie: not need to do this every frame) Bug: 5238473 Change-Id: Ia7b47e145b48581b568d89d9aa2c14ff778be862
* Fix screenshotsMathias Agopian2011-08-251-7/+13
| | | | Change-Id: If904634e64b154bbe336d5789dd1209b8ae871fb
* Merge "Fix Recent thumbnails aren't taken when leaving an activity via ↵Mathias Agopian2011-08-241-1/+1
|\ | | | | | | notification"
| * Fix Recent thumbnails aren't taken when leaving an activity via notificationMathias Agopian2011-08-241-1/+1
| | | | | | | | | | | | | | | | When taking screenshots we need to use the full drawing state list instead of the visible list. Bug: 5186823 Change-Id: I214ee0203aaf8e2c038e44581f7f1ae36edf08c5
* | Merge "SurfaceFlinger: use the HWC gralloc usage bit"Jamie Gennis2011-08-241-0/+1
|\ \ | |/ |/|
| * SurfaceFlinger: use the HWC gralloc usage bitJamie Gennis2011-08-221-0/+1
| | | | | | | | | | | | | | | | This change makes SurfaceFlinger always use the GRALLOC_USAGE_HW_COMPOSER usage bit when allocating buffers that may be passed to the HWComposer. Change-Id: I70362a8ede2b359fb2046853f85149d597465817
* | Merge changes I14e03939,I9aafe6f2Mathias Agopian2011-08-235-9/+23
|\ \ | | | | | | | | | | | | | | | * changes: Fix an issue where Surface::lock() would never update the output region Add a debug option to turn the "transformation hint" off
| * | Add a debug option to turn the "transformation hint" offMathias Agopian2011-08-235-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | transformation hint is disabled with: adb shell service call SurfaceFlinger 1009 i32 1 Change-Id: I9aafe6f280f88ce41569ed69a06dc522b10e3a88
* | | Minor cleanupMathias Agopian2011-08-233-442/+5
|/ / | | | | | | Change-Id: Ic042043c54631b5a5c74d20136addb2c08515ea9
* | fix "show screen update" debug option.Mathias Agopian2011-08-222-20/+27
|/ | | | | Change-Id: I7d8b24124768b5f7d59d3bb0b019e9baaa0dfc4f NOTE: from now on, this also disable the h/w composer
* give the proper orientation to the h/w composer HALMathias Agopian2011-08-183-3/+4
| | | | | | | | | | | | we were using the "orientation" value instead of the real transform, which may contain arbitrary rotations for instance, and in some case ended up with a final "orientation" that looked valid, but wasn't. this fixes a problem on devices with a h/w composer hal where the rotation animation looked weird. Change-Id: I4be8a2a1bde49c33456fcf5c8d87ab515c216763
* SurfaceTexture: fix queues-to-composerJamie Gennis2011-08-176-9/+29
| | | | | | | | | | | This change fixes the NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER query of Surface and SurfaceTextureClient. Surface now uses the inherited SurfaceTextureClient implementation of this query. SurfaceTextureClient now queries SurfaceFlinger to determine whether buffers that are queued to its ISurfaceTexture will be sent to SurfaceFlinger (as opposed to some other process). Change-Id: Iff187e72f30d454229f07f896b438198978270a8
* as a debug option SrufaceFlinger can now connect to DDMSMathias Agopian2011-08-155-0/+120
| | | | | | | | | this is disabled by default. To enable: setprop debug.sf.ddms 1 this debug option requires to restart SurfaceFlinger Change-Id: Ic2f8050b29911b55bcd21721648b6978700c277d
* fix an orientation change drawing artifact.Mathias Agopian2011-08-121-3/+2
| | | | | | | | | | | a wrong orientation would be briefly shown when rotation the screen. this happened when the window manager set a custom transformation and the h/w composer was used. the custom transformation was applied twice in that case. Bug: 5037522 Change-Id: Ic1f87b63cd843f4475e4265d1624463825d775c4
* SurfaceFlinger doesn't rely on having a custom RefBase destructorMathias Agopian2011-08-114-38/+11
| | | | | we just use a message to the main thread to destroy our GLES state.
* return correct value from query after connecting a surfaceMathias Agopian2011-08-082-3/+14
| | | | | | | | | | the first time a surface was connected, the values returned by query NATIVE_WINDOW_DEFAULT_{WIDTH|HEIGHT} and NATIVE_WINDOW_TRANSFORM_HINT were wrong until a call to queueBuffer was performed. Bug: 5137366, 5121607 Change-Id: I7ac6b5b0daa876638f6bed7c20f286a6e6d984f6
* improve dumpsys SurfaceFlinger outputMathias Agopian2011-08-081-1/+1
| | | | | | we now output the handle and size of all buffers of each layer. Change-Id: I8d011ee4ae9199f4198bd07bed770ec3bcf02986
* fix a crasher in surfaceflingerMathias Agopian2011-08-021-2/+7
| | | | | | | this would happen if being told to draw before a buffer was available. Change-Id: I46d121c73e883078cdbf952063e38b0076f79038
* Merge "update HWC data structures even when a layer is marked for SKIP"Mathias Agopian2011-08-022-29/+43
|\