Commit Graph

47341 Commits

Author SHA1 Message Date
Jamie Gennis
98ff0597bd SurfaceTexture: eglDestroySync after duping its fd
This change adds a call to eglDestroySync after we've dup'd the fd for the
Android fence that the EGLSyncKHR object wraps.

Change-Id: I4fa6ece863260793630d70bb9a69d6284d05d99e
2012-09-10 14:49:42 -07:00
Jamie Gennis
ac4f9175ae am 61e04b92: SurfaceTexture: use eglWaitSync
* commit '61e04b92bdeafc6fca89052d14dab1bd0c384a71':
  SurfaceTexture: use eglWaitSync
2012-09-10 13:33:19 -07:00
Jamie Gennis
61e04b92bd SurfaceTexture: use eglWaitSync
This change adds a compile-option to use eglWaitSyncANDROID to ensure that
texturing operations that access the current buffer of a SurfaceTexture do not
occur until the buffer is completely written.  It also moves this
synchronization into a new SurfaceTexture method called doGLFenceWait and
changes SurfaceFlinger's Layer class to use that method rather than performing
its own wait on the fence.

Change-Id: I70afa88086ca7ff49a80e3cd03d423767db7cb88
2012-09-10 13:27:23 -07:00
Jamie Gennis
26606ba0a0 am 010dd4fb: EGL: Add the EGL_ANDROID_wait_sync extension
* commit '010dd4fb892aecf71e4631c22148fe57ef5b3958':
  EGL: Add the EGL_ANDROID_wait_sync extension
2012-09-10 12:13:33 -07:00
The Android Automerger
98625e6a3e merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-10 06:59:29 -07:00
Jamie Gennis
010dd4fb89 EGL: Add the EGL_ANDROID_wait_sync extension
Change-Id: Ie9a78e07fcaf27c5c13797141ad3c692217607fb
2012-09-09 17:52:18 -07:00
Jamie Gennis
649634805d am 605f90dc: Merge "SurfaceTexture: use EGL-created native fences" into jb-mr1-dev
* commit '605f90dc867a18f1ea06203ffa70916f70820f92':
  SurfaceTexture: use EGL-created native fences
2012-09-09 13:01:20 -07:00
Jamie Gennis
605f90dc86 Merge "SurfaceTexture: use EGL-created native fences" into jb-mr1-dev 2012-09-09 13:00:16 -07:00
Jamie Gennis
01dbf5539b SurfaceTexture: use EGL-created native fences
This change adds support for using Android fences that come from EGLSyncKHR
objects as the release fence for a buffer.

Change-Id: Ice192ce2ec001020f909a2018afdf0f17b24dec9
2012-09-09 12:58:23 -07:00
The Android Automerger
ab75098eec merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-09 07:00:22 -07:00
Jeff Brown
7ee89420d8 am 4c05dd17: Ensure that viewport and frame are initialized.
* commit '4c05dd175ee3bd5119eecf368742b6510a8cfa6c':
  Ensure that viewport and frame are initialized.
2012-09-09 00:17:07 -07:00
Jeff Brown
4c05dd175e Ensure that viewport and frame are initialized.
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
2012-09-09 00:07:17 -07:00
Jeff Brown
a8f4bba845 am 4fb3999c: Fix display projection.
* commit '4fb3999cea652617be5125f8a42c257467bf3c77':
  Fix display projection.
2012-09-07 15:01:48 -07:00
Jeff Brown
4fb3999cea Fix display projection.
Change-Id: I0f253dc3759b99e05ff8344b0f513d8c289702e7
2012-09-07 12:55:10 -07:00
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