Commit Graph

47377 Commits

Author SHA1 Message Date
Andy McFadden
6652b3edcb Watch for SurfaceFlinger death
The ComposerService object wasn't watching for SurfaceFlinger
restarts, which doesn't usually matter because the app framework
restarts when SurfaceFlinger dies.  However, mediaserver continues
to run, which means its ComposerService object was trying to use
a dead handle, and playback of DRM movies was failing.

This adds a DeathRecipient listener and some logic to re-establish
the SurfaceFlinger connection.

Bug 6645813

Change-Id: I07581b881d3835601aa57d5358c8259d93bc4515
2012-09-06 18:54:42 -07:00
Jamie Gennis
15c72645cd am b2725415: libgui: move fence handling into ConsumerBase
* commit 'b27254154642575dfb4bbfa79fbedde7d7ee23dd':
  libgui: move fence handling into ConsumerBase
2012-09-06 18:02:41 -07:00
Jamie Gennis
b272541546 libgui: move fence handling into ConsumerBase
This change moves some common fence handling code into the base class for
BufferQueue consumer classes.  It also makes the ConsumerBase class initialize
a buffer slot's fence with the acquire fence every time a buffer is acquired.

Change-Id: I0bd88bc269e919653b659bfb3ebfb04dd61692a0
2012-09-06 17:54:53 -07:00
Jamie Gennis
0a8e336792 am 331841b9: EGL: add the native_fence_sync extension
* commit '331841b96b92646c93c87627c03f77b892f711cd':
  EGL: add the native_fence_sync extension
2012-09-06 16:14:30 -07:00
Jamie Gennis
331841b96b EGL: add the native_fence_sync extension
This change adds support for the EGL_ANDROID_native_fence_sync extension to the
Android EGL layer.  It also fixes a couple minor issues with the extension spec.

Change-Id: Ic8829d21f37b701f33aa9c72c3d25e88e03fa3cd
2012-09-06 16:11:37 -07:00
Jamie Gennis
2ec08f825f am 8893d5bb: EGL_ANDROID_native_fence_sync: fix the version
* commit '8893d5bba1191b0dc9db1432868d8dc64de606ad':
  EGL_ANDROID_native_fence_sync: fix the version
2012-09-06 15:00:28 -07:00
The Android Open Source Project
ec11a7ec97 Reconcile with jb-mr1-release - do not merge
Change-Id: I459a44bdaaff7aebadd1db41260960bba3e3a402
2012-09-06 07:53:49 -07:00
The Android Automerger
911d485971 merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-06 06:34:08 -07:00
Jamie Gennis
8893d5bba1 EGL_ANDROID_native_fence_sync: fix the version
Change-Id: Ib43b8fec8f37bb847d7bcdbf7607fd56f19a0563
2012-09-05 19:46:34 -07:00
Jesse Hall
02de802182 Always reset layer acquireFenceFd after commit
If SurfaceFlinger needs to refresh the screen but the dirty region is
empty, it won't set the layer acquire fences, and stale file
descriptors will be passed to HWC commit(). Now we make sure to clear
the stale file descriptors for each layer right after commit().

Bug: 7078301
Change-Id: I6953ff91fc5488f105b30b07306f9c45a4c3f780
2012-09-05 16:52:13 -07:00
Mathias Agopian
2cf855fbef fix a problem where all hwc layers would have the SKIP flags set
the problem was that LayerBase::setPerFrameData() was always setting
this flag. in fact there was no reason to do this at that point since
the layer is initialized to a default state in setGeometry().

Bug: 7111259
Change-Id: Ib37b0dd7391a6163070e9aca025512159c1705f9
2012-09-05 16:52:03 -07:00
Mathias Agopian
9d34129e16 am 55882dea: fix a problem where all hwc layers would have the SKIP flags set
* commit '55882dea1b1b305f15192b96ff7814f18babb212':
  fix a problem where  all hwc layers would have the SKIP flags set
2012-09-05 16:51:06 -07:00
Mathias Agopian
55882dea1b fix a problem where all hwc layers would have the SKIP flags set
the problem was that LayerBase::setPerFrameData() was always setting
this flag. in fact there was no reason to do this at that point since
the layer is initialized to a default state in setGeometry().

Bug: 7111259
Change-Id: Ib37b0dd7391a6163070e9aca025512159c1705f9
2012-09-05 16:49:04 -07:00
Jesse Hall
bc17bc327b am fe4c745c: Merge "Always reset layer acquireFenceFd after commit" into jb-mr1-dev
* commit 'fe4c745c6d62fb416758cc5aaff3e7decb7ec06b':
  Always reset layer acquireFenceFd after commit
2012-09-05 13:57:20 -07:00
Jesse Hall
fe4c745c6d Merge "Always reset layer acquireFenceFd after commit" into jb-mr1-dev 2012-09-05 13:54:53 -07:00
Jamie Gennis
6d53451b03 am f42449e1: Merge "EGL_ANDROID_fence_sync: make it more generic" into jb-mr1-dev
* commit 'f42449e1259315d726efa75129bf1c4f5c0150d7':
  EGL_ANDROID_fence_sync: make it more generic
2012-09-05 13:51:41 -07:00
Jamie Gennis
f42449e125 Merge "EGL_ANDROID_fence_sync: make it more generic" into jb-mr1-dev 2012-09-05 13:48:51 -07:00
Jesse Hall
e25d005d91 Always reset layer acquireFenceFd after commit
If SurfaceFlinger needs to refresh the screen but the dirty region is
empty, it won't set the layer acquire fences, and stale file
descriptors will be passed to HWC commit(). Now we make sure to clear
the stale file descriptors for each layer right after commit().

Bug: 7078301
Change-Id: I6953ff91fc5488f105b30b07306f9c45a4c3f780
2012-09-05 13:03:10 -07:00
The Android Automerger
c3026f7ac9 merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-05 06:34:02 -07:00
Mathias Agopian
fee4bbcc76 am 1501d54d: minor cleanup
* commit '1501d54d63c55dc4e8f4c6eeaeac35aca6660ffc':
  minor cleanup
2012-09-04 21:09:34 -07:00
Mathias Agopian
1501d54d63 minor cleanup
Change-Id: Ied80e14878e92a506930f7a5a55adde8f260ec70
2012-09-04 21:04:09 -07:00
Mathias Agopian
f9a65e176b am 762d0114: Merge "display projection API now has a single function instead of 3" into jb-mr1-dev
* commit '762d0114759686b65feca832a5437e2aee343a13':
  display projection API now has a single function instead of 3
2012-09-04 20:30:00 -07:00
Mathias Agopian
3266cdac8a am 71e83e12: the visibleRegion was never set in hwcomposer
* commit '71e83e1202dc87afde9c0c31f31c129f3f99263f':
  the visibleRegion was never set in hwcomposer
2012-09-04 20:29:59 -07:00
Mathias Agopian
762d011475 Merge "display projection API now has a single function instead of 3" into jb-mr1-dev 2012-09-04 20:27:48 -07:00
Mathias Agopian
71e83e1202 the visibleRegion was never set in hwcomposer
Bug: 7089478
Change-Id: I13b031b23ce908d33f431a04e1cf87831b551260
2012-09-04 20:25:39 -07:00
Jamie Gennis
a1d49ce1f1 EGL_ANDROID_fence_sync: make it more generic
This change updates the extension spec to refer to generic "native fence sync
objects" rather than "Android fence sync objects."

Change-Id: I15a79f08571586431845b54c58c8420b652f40ef
2012-09-04 19:49:51 -07:00
Mathias Agopian
00e8c7a88a display projection API now has a single function instead of 3
Change-Id: I9bf46d372b77d547486d4bbe6f1953ec8c65e98f
2012-09-04 19:30:46 -07:00
Mathias Agopian
84eda0448a am da8d0a5c: implement display viewport and frame
* commit 'da8d0a5c0cf9d41915d3b106cad4aaec3e767c11':
  implement display viewport and frame
2012-09-04 17:04:35 -07:00
Mathias Agopian
da8d0a5c0c implement display viewport and frame
note: viewport clipping is not implemented yet

Change-Id: I7fde7c4de075d409d95c48bb20ba8ee017f6f00a
2012-09-04 16:59:06 -07:00
Jamie Gennis
e4f7d56ef1 am 493db479: Merge "BufferQueue: add a setMaxAcquiredBufferCount check" into jb-mr1-dev
* commit '493db47929cdd805339e453062fef265d8985692':
  BufferQueue: add a setMaxAcquiredBufferCount check
2012-09-04 15:00:40 -07:00
Jamie Gennis
493db47929 Merge "BufferQueue: add a setMaxAcquiredBufferCount check" into jb-mr1-dev 2012-09-04 14:58:51 -07:00
Jamie Gennis
c802e131b5 am e84ec393: Merge "libgui: add BufferQueue test infrastructure" into jb-mr1-dev
* commit 'e84ec393bb48e4817eaa280ee51c099af041b14c':
  libgui: add BufferQueue test infrastructure
2012-09-04 14:57:52 -07:00
Jamie Gennis
d99bfe4212 am 374850cf: Merge "libgui: disable CpuConsumer tests" into jb-mr1-dev
* commit '374850cf161ecacc292afe8e34cbe3f96c0d8e85':
  libgui: disable CpuConsumer tests
2012-09-04 14:56:28 -07:00
Fabrice Di Meglio
31ce13d721 am 13e12578: Merge "Add support for "-rtl" in resources" into jb-mr1-dev
* commit '13e12578385fdbfa78b19dfa052ffaed4a68234b':
  Add support for "-rtl" in resources
2012-09-04 14:56:27 -07:00
Jamie Gennis
e84ec393bb Merge "libgui: add BufferQueue test infrastructure" into jb-mr1-dev 2012-09-04 14:55:59 -07:00
Jamie Gennis
374850cf16 Merge "libgui: disable CpuConsumer tests" into jb-mr1-dev 2012-09-04 14:55:38 -07:00
Fabrice Di Meglio
13e1257838 Merge "Add support for "-rtl" in resources" into jb-mr1-dev 2012-09-04 14:55:03 -07:00
Jamie Gennis
c68f2ecfa0 BufferQueue: add a setMaxAcquiredBufferCount check
This change adds a check to verify the validity of the value passed to
setMaxAcquiredBufferCount.

Change-Id: I39730557aa58261e678bd6e4fce11bab78e98362
2012-09-04 14:54:34 -07:00
Andy McFadden
50ba6b7304 am 6b09f280: Merge "Add timeout when waiting for HW vsync" into jb-mr1-dev
* commit '6b09f280e522da902ca41b96c3e4510d7a2879b7':
  Add timeout when waiting for HW vsync
2012-09-04 09:40:13 -07:00
Andy McFadden
6b09f280e5 Merge "Add timeout when waiting for HW vsync" into jb-mr1-dev 2012-09-04 09:38:39 -07:00
The Android Automerger
d56d8c35e3 merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-03 06:34:05 -07:00
Keun young Park
7beee7f35a am 63f165fd: add libsurfaceflinger_ddmconnection for PDK build
* commit '63f165fd6b86d04be94d4023e845e98560504a96':
  add libsurfaceflinger_ddmconnection for PDK build
2012-08-31 20:12:47 -07:00
Mathias Agopian
caf2d84814 am c3973608: the visible region sent to HWC was garbage
* commit 'c39736088398a9b4367b30fc307ed7de96ac342e':
  the visible region sent to HWC was garbage
2012-08-31 20:08:47 -07:00
Keun young Park
63f165fd6b add libsurfaceflinger_ddmconnection for PDK build
- the library is dlopened from libsurfaceflinger
- the library built only when libnativehelper exists

Bug: 7089510
Change-Id: Ib3ea1029d7e8f6e055f4b759d0bf68f5123fa8a1
2012-08-31 20:08:33 -07:00
Mathias Agopian
0469605805 am 50f262fe: minor SharedBuffer clean-up
* commit '50f262fe569b52bb4d44c96de0d296188ce3885e':
  minor SharedBuffer clean-up
2012-08-31 18:45:31 -07:00
Mathias Agopian
1251754a1f am 2401ead7: Add a way to retrieve a Region as a SharedBuffer
* commit '2401ead70099c982796ecc3ec63ec8a5570948fc':
  Add a way to retrieve a Region as a SharedBuffer
2012-08-31 18:45:30 -07:00
Mathias Agopian
a62b0f63e6 am 3ab68558: change how we store Region data internally
* commit '3ab68558fa5a4b8f792a54965a010f03385bd271':
  change how we store Region data internally
2012-08-31 18:45:30 -07:00
Mathias Agopian
5f86fd299b am 4c0a1705: don\'t generate a new Region when translating by 0,0
* commit '4c0a170585d5c8a1f3508ac55f799ebaf86e91db':
  don't generate a new Region when translating by 0,0
2012-08-31 18:45:29 -07:00
Mathias Agopian
df0adbbb60 am 2098517e: make sure Parcel handles 0-sized LightFlatenables
* commit '2098517e3e12a401005d7a7510d6c4943707b98d':
  make sure Parcel handles 0-sized LightFlatenables
2012-08-31 18:45:28 -07:00
Mathias Agopian
c397360883 the visible region sent to HWC was garbage
we used to have a visibleRegion object per layer, but now
it's per screen; so at somepoint the code got changed to
calculate the per-screen visible region on the stack and that's
what got passed to HWC.

we're now setting the visibleRegionScreen at each frame and
freeing at after the HWC set() call. We use the underlaying
SharedBuffer so that in most cases we don't have to allocate,
free or copy memory around.

Bug: 7089478
Change-Id: I24fa556c76613a225d9fe7a6c6b727bb476144d8
2012-08-31 18:41:22 -07:00