Commit Graph

207 Commits

Author SHA1 Message Date
Mathias Agopian
c666cae2d5 get rid of the shared-memory control block
Change-Id: If814060aca1d2ff2619d4adcd57296983d207f7f
2012-07-25 21:13:10 -07:00
Mathias Agopian
028508cad5 hopefully fixe a race condition in sf initialization
if we received a vsync event during SF init, we could crash
as not all objects were ready to go.

Change-Id: Ie11b46e3eb1b37a709dd8757843d444f93dd0189
2012-07-25 21:13:10 -07:00
Mathias Agopian
8630320433 split HWComposer out of DisplayHardware
we will only ever have a single instance of HWComposer, so
it's now an attribute of SurfaceFlinger, instead of being part
of DisplayHardware.

DisplayHardware now just represents a "display" (it should be renamed).

Change-Id: Iec191e57686868e1df6daa8b880a286c9fefde56
2012-07-24 22:49:49 -07:00
Mathias Agopian
98a121aa91 get rid of ro.sf.hwrotation, it's not used anymore
Change-Id: I2ee469ac89ecd65d7187be5cab08b5cc18f67cbe
2012-07-24 21:42:27 -07:00
Mathias Agopian
8785578391 add a layerStack attribute to Layers.
this attribute can be set through a regular transaction using
SurfaceComposerClient (just like any other attribute, eg: position or size)

Change-Id: I701a47c677ea6442ca713728a93335328cd2b172
2012-07-24 21:42:27 -07:00
Mathias Agopian
8b33f03232 update SF binder protocol to support setting display attributes
no change of functionality -- the old behavior is implemented
on top of this new protocol.
this new protocol will allow, eventually, to pass informations
about displays and layer stacks.

Change-Id: Ic6c2295e61ec8ecbc8ce01ab7664e35d928202fc
2012-07-24 20:43:54 -07:00
Mathias Agopian
921e6ac4b7 SurfaceFlinger cleanup
mostly refactored SurfaceFlinger.h, but also removed dead code.
cleaned-up a few includes as well.

Change-Id: Ib15f4ffe567912b61ee98aa076c6a283b72811b5
2012-07-24 00:09:35 -07:00
Jesse Hall
6ee93c0d36 Increment iterator on early-out too
Bug: 6860046
Change-Id: I82f9e4062cb58d5479c9d8dc5f2f0770a1dcc605
2012-07-23 13:12:28 -07:00
Jesse Hall
a6b32db164 Handle empty HWC layer list when composing
Bug: 6777877
Change-Id: I71e9b948d04dda33d45cfa986d9c7e28328cf749
2012-07-20 11:46:58 -07:00
Mathias Agopian
a49126087b factor EGL/GL and surface creation out of DisplayHardware
Change-Id: Icd85a6a4caad06f056578008af3e21666fa8b1f4
2012-07-19 14:14:58 -07:00
Mathias Agopian
3b1d2b6b2b mVisibleLayersSortedByZ is now maintained per display
Change-Id: Idcdb77eba1a3f99b3e4b2150128a82acaffcd2a8
2012-07-19 14:13:46 -07:00
Mathias Agopian
4fec873a98 one more step towards multiple display support
- remove dependency on cached state in validateVisibility
- get rid of mVertices and mTransformedBounds
- get rid of validateVisibility
- get rid of unlockPageFlip
- handleTransaction now returns a dirty region
- computevisibileregion now uses window-manager space
2012-07-10 14:29:27 -07:00
Jesse Hall
c5c5a14c06 Only set acquire fences on overlay layers
Change-Id: I08e8173f83580de5a4e43a0ba5ea03e5ec6e8782
2012-07-02 16:49:28 -07:00
Mathias Agopian
1b03149f35 get rid of GraphicPlane
its functionality is now folded into DisplayHardware
there will be more changes in that area.
2012-06-28 17:27:19 -07:00
Mathias Agopian
3094df359d First prototype atttempting to support an external display
both API and implementation will change, this is just a prototype
intended to show feasability.

SurfaceFlinger is passed an ISurfaceTexture through a new
callback, it is in turn used to create an EGLSurface which
surfaceflinger will draw into in addition to the main screen.

Change-Id: Id0bbb0b854bb7bae44d57246a90b65d4567f9a21
2012-06-28 15:51:08 -07:00
Jesse Hall
ef19414bd8 Transfer HWC release fences to BufferQueue
After a HWC set, each SurfaceFlinger Layer retrieves the release fence
HWC returned and gives it to the layer's SurfaceTexture. The
SurfaceTexture accumulates the fences into a merged fence until the
next updateTexImage, then passes the merged fence to the BufferQueue
in releaseBuffer.

In a follow-on change, BufferQueue will return the fence along with
the buffer slot in dequeueBuffer. For now, dequeueBuffer waits for the
fence to signal before returning.

The releaseFence default value for BufferQueue::releaseBuffer() is
temporary to avoid transient build breaks with a multi-project
checkin. It'll disappear in the next change.

Change-Id: Iaa9a0d5775235585d9cbf453d3a64623d08013d9
2012-06-21 22:21:12 -07:00
Mathias Agopian
aa049f0d19 am 8aaf3e47: am a67e418e: Exit boot animation cleanly.
* commit '8aaf3e47a51aa0beebecc8c536504d310d07cda9':
  Exit boot animation cleanly.
2012-06-20 13:39:58 -07:00
Mathias Agopian
a67e418e1f Exit boot animation cleanly.
The desc.txt file can now mark parts as 'must finish cleanly' by using
'c' as the part line prefix rather than 'p'.  If so indicated, if the
bootanimation is asked to quit it will do so only after waiting to
finish that part.

I considered either making init.c service killing smarter or promoting
bootanim to be a bindable service with a requestExit method.  However,
these changes are probably too big/risky given our ship date.  So
I used a property as a mailbox between SurfaceFlinger and bootanim.

Bug: 6679877
Change-Id: Id7dca22caa50b450fff25ca94f7242d971034f41
2012-06-19 17:32:00 -07:00
Mathias Agopian
5df996211d fix typo in makefile LOCAL_CFLAGS was spelled LOCAL_CLFAGS
Change-Id: I58b96d28f608ce16fcad5ed0efb887e582779e03
2012-06-18 17:27:56 -07:00
Mathias Agopian
db403e8ff0 split-up Client.h out of SurfaceFlinger.h
Change-Id: I1993bf23e417163749d886283563a93d50b361b4
2012-06-18 16:47:56 -07:00
Mathias Agopian
3e8b853d67 refactor HWComposer to break dependency with the HAL headers
HWComposer must abstract the HWC HAL entirely, so that the
HAL can continue to evolve (and break binary compatibility)
without breaking SurfaceFlinger. The HWC data structure had
leaked outside of HWComposer, this is now fixed.

We now have an abstract interface that provide all the
needed functionality, HWCompose provides concrete
implementations of it based on the the HWC version.

Change-Id: I40c4676dc986b682ede5520a1c60efe64037b0bb
2012-06-14 11:56:55 -07:00
Colin Cross
8e533069e5 surfaceflinger: replace early suspend with binder call from PowerManager
SurfaceFlinger will no longer directly synchronize with early suspend.
Instead, PowerManagerService will synchronize with SurfaceFlinger to
ensure that a black frame has been drawn on the display, and then
trigger all early suspend handlers.

Change-Id: I07acdd628440d23fdb69db94319ec5d65d3f4919
2012-06-07 16:28:30 -07:00
Jamie Gennis
a4c5b19dd7 SurfaceFlinger: remove all GLES scissor calls.
Bug: 6576505
Change-Id: I494b7627f2e271a234706bf49a9490f8ac56c77a
2012-06-05 19:14:44 -07:00
Mathias Agopian
ed9807bd7d we need to wait for vsync when doing the screen-off animation
Bug: 6511421
Change-Id: I7a85a55e66a3a8d9937df575e98a5efec01a634f
2012-05-18 14:30:40 -07:00
Jamie Gennis
f15a83f581 SurfaceFlinger: add a crop to the layer state
This change adds a crop rectangle specified in window coordinates to the layer
state.  The all window pixels outside this crop rectangle are treated as though
they were fully transparent.  This change also adds the plumbing necessary for
WindowManager to set that crop.

Change-Id: I582bc445dc8c97d4c943d4db8d582a6ef5a66081
2012-05-11 03:16:02 -07:00
Mathias Agopian
56a2bbe708 SF needs to render even if we don't have a h/w composer
Bug: 6350574, 6361055
Change-Id: Iab92cc31bab4771fca63619c8e3105c759535f72
2012-04-18 18:36:25 -07:00
Mathias Agopian
b9494d5c9d make sure to clear the framebuffer when using overlays
Bug: 6354761, 6353719
Change-Id: I0739de3fee7c54c14b294ffd768b70ee1f541d9e
2012-04-18 02:28:45 -07:00
Mathias Agopian
f74e8e0602 don't attempt to clip layers anymore using glScissor
this seems to hurt performance on some GPU. this change
might negatively affect performance on other GPUs though, but
probably in less time-sensitive cases. If this becomes a
problem it might become necessary to pre-clip the geometry
(so that we don't have to use glScissor).

This improves the rotation animation quite a bit.

Change-Id: I5dbe1286f7ad858ef2c1e1ad9a07ee3f26c0b1f3
2012-04-16 03:19:15 -07:00
Mathias Agopian
a2f4e56fec get rid off preserve backbuffer optimization in SF
this optimization didn't improve performance and in fact
seemed to hurt more than anything else. it also made
things a lot more complex as it introduced edges cases
when switching to/from h/w composer.

Change-Id: Iaafc235e175f5740cd98bff914d706e02ab88bb8
2012-04-16 03:19:15 -07:00
Mathias Agopian
8acce2046a make sure to repaint the screen when screen turns on
Bug: 6336168
Change-Id: Ic6f11b6bf6c3d849f5cb6ac95961d10d7f88e4ec
2012-04-13 16:18:55 -07:00
Mathias Agopian
69a655caef Revert "handle surfaces posts independently from composition"
This reverts commit 562f4b2c1e.

Change-Id: I96efe11c2f0494ed2d57fc580e49c598d913830e
2012-04-11 20:43:40 -07:00
Mathias Agopian
562f4b2c1e handle surfaces posts independently from composition
surfaceflinger will now handle each surface post
as soon as possible and handle the composition
itself at VSYNC time as usual.

Change-Id: I6b1ae33fd56062d86e5419ebab8def0ca5803fbf
2012-04-11 18:17:30 -07:00
Mathias Agopian
22ffb117b0 make sure to disable VSYNC while screen is off
Change-Id: If1894c43b0a39a2851e1280a35ae77bccd6d9abd
2012-04-11 15:31:40 -07:00
Mathias Agopian
b60314a12f rework screen on/off code
Change-Id: I13f71e850592a588bbd4805b1830c503bd4decb4
2012-04-10 22:18:43 -07:00
Mathias Agopian
cb9732a951 refactor / simplify EventThread
Change-Id: I3981c6fba93b7b985174b2a7045e24db2c0b4428
2012-04-03 18:28:25 -07:00
Mathias Agopian
4b2ba53423 better workaround for bug: 6020860
this prevents the GPU from running when composition
is fully handled by overlays. this should improve
animations a bit.

Change-Id: If4ae584b7a3976e6bdd36e318686ac3940b6b075
2012-03-29 12:23:51 -07:00
Colin Cross
3854ed5490 surfaceflinger: disable ddms debugging on pdk builds
DDMS debugging depends on non-pdk apis, disable it when a pdk
build is selected.

Change-Id: I6376b5c4cf49f2c51f35f8d567f7c6d18daf893f
2012-03-23 15:54:21 -07:00
Mathias Agopian
b5dd9c0fee rewrite density calculation code so it's understandable
Change-Id: I1016cd5fd75355abe4ab879d04f4849bd2dd4122
2012-03-22 12:20:06 -07:00
Daniel Lam
b267579ba8 SurfaceTexture: Fully refactored from BufferQueue
SurfaceTexture and BufferQueue are separate objects.

Change-Id: I230bc0ae6f78d0f9b2b5df902f40ab443ed5a055
2012-03-13 14:39:07 -07:00
Mathias Agopian
fddc28d871 add ATRACE logs for screenshots
Change-Id: Ie8146c4d7608159e9d28b7338f9109b8fcdf955f
2012-03-13 16:50:39 -04:00
Mathias Agopian
35aadd6be2 fix surfaceflinger's dumpsys
Change-Id: I7b95c3e04f145003f9c0eef321a21f3f36dfe835
2012-03-08 22:01:51 -08:00
Mathias Agopian
841cde5554 add more ATRACE
Change-Id: I6cc5759fb0a05427680488fd12ae797e77644f3d
2012-03-01 20:16:39 -08:00
Jamie Gennis
1c8e95cf86 Add tracing to various graphics components.
This change adds ATRACE call tracing to BufferQueue,
SurfaceTextureClient, SurfaceTexture, SurfaceFlinger, Layer, and EGL.

Change-Id: I9d75ed26f5a3f0d1af635da38289520134cfbbb7
2012-02-27 17:50:35 -08:00
Mathias Agopian
90ac799241 fix libgui header location
Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
2012-02-27 13:03:08 -08:00
Mathias Agopian
ff615cc7a1 deprecate L_8, LA_88 and RGB_332 in sdk
re-add support for pixelformats L_8, LA_88 and RGB_332 in libui
for backward compatibility.

This may or may not fix 6058926

Bug: 6049685
Change-Id: Ic1b8b4cc994522f7fe664da64c0ef76b98bc6d53
2012-02-24 14:58:36 -08:00
Mathias Agopian
fbc7922ec8 workaround for an issue where the screen would flicker sometimes
bug: 6020860
Change-Id: I97807db66b66c5f4dcbed0df79d5d257cfc7c0bd
2012-02-23 21:20:01 -08:00
Mathias Agopian
4d143eed99 fix an issue in SF where we could miss some updates
Change-Id: I7d350bc05d1596655baddff3deaebaba58c9bcc0
2012-02-23 21:17:01 -08:00
Mathias Agopian
751d0bb9b2 Merge "SurfaceFlinger: set wrap mode on screenshot texture" 2012-02-20 22:50:36 -08:00
Dianne Hackborn
1676828d11 Merge "Return information about whether overlays are disabled." 2012-02-07 13:46:46 -08:00
Dianne Hackborn
12839bee29 Return information about whether overlays are disabled.
Change-Id: I85ae42e9f28461f5142cc6b3c8e25ff3f195805a
2012-02-06 21:21:05 -08:00