the deadlock would happen when the pipe became invalid and SF
trying to remove the connection from its list.
we know make sure to process events without holding a lock.
Change-Id: I39927ed8824fc7811e16db3c7608a2ebc72d9642
Layer::lockPageFlip() and layer::onRemove() could be called on
different threads and race such that lockPageFlip() successfully
called mSurfaceTexture->updateTexImage() but then gets NULL back from
mSurfaceTexture->getCurrentBuffer(), leading to a crash.
This change moves Layer::onRemove() calls to
SurfaceFlinger::commitTransaction() so they happen after the Layer is
done being drawn from and only happen on the main surfaceflinger
thread.
Change-Id: I4b550caadff4cc1878d7c3bca6129193fb0c713e
This change adds a compile-time option for SurfaceTexture to use the
EGL_KHR_fence_sync extension to synchronize access to Gralloc buffers.
Bug: 5122031
Change-Id: I7e973a358631fff5308acf377581b811911fe790
use gui/DisplayEvent to receive the events. Events are
dispatched through a unix pipe, so the API is compatible
with utils/Looper. see gui/DisplayEvent.h for more info.
Bug: 1475048
Change-Id: Ia720f64d1b950328b47b22c6a86042e481d35f09
Revert "Add support for sending VSYNC events to the framework"
This reverts commit f3918c5bd4bc9f02f74da42995564150ca2dd382.
Change-Id: I998e3e1aa3fa310829ae973b64fe11b01f6f468f
* changes:
Add support for sending VSYNC events to the framework
BitTube::read now handles EAGAIN
split ComposerService out of SurfaceComposerClient.h
rewrite SF's message loop on top of Looper
use gui/DisplayEvent to receive the events. Events are
dispatched through a unix pipe, so the API is compatible
with utils/Looper. see gui/DisplayEvent.h for more info.
Bug: 1475048
Change-Id: If4126023fc9c067e56087ec7d16a8fd542ce1794
- don't advertise extensions that are not supported
by any implementation
- remove EGL_ANDROID_swap_rectangle which is not
implemented by anybody and confuses people
- add some comments about mandatory extensions
Bug: 5428001
Change-Id: Id8dc48116ac1d1eb79ec9ef55d03e29d4257c1f3
This fixes the issue:
"Call not sent" dialog takes too long to dismiss after hitting OK"
Note: the system would recover after a 5 second timeout.
Bug: 5534520
Change-Id: Ifa37e594b50581f498479a5858672441b3d7dd87
The ScreenShot layer is now created hidden. The screenshot itself
is aquired during the transaction when the layer is made visible.
This guarantees the screenshot and the layer happen atomically
with respect to screen updates.
Bug: 5534521
Change-Id: Ida23e1f13d5716ec83b78a15712e0646d6cf8729
We now have mInvalidateRegion which holds the region to invalidate, it
can be set from any thread as long as mInvalidateLock is held. We use
fine-grained locking here because mInvalidateRegion can be set from anywhere,
in particular frmo HWC callbacks.
Bug: 5466774
Change-Id: Iafca20aa3f5b25a87755e65bde7b769aa8f997bc
A LayerScreenshot is a special type of layer that contains a screenshot of
the screen acquired when its created. It works just like LayerDim.
Make sure to call compositionComplete() after rendering into a FBO.
Bug: 5446982, 5467587, 5466259
Change-Id: I5d8a1b4c327f9973d950cd4f4c0bca7f62825cd4
there was situations where SF's main loop would run (as if there was
an invalidate), but the dirty region was empty (so no new buffers
were retired). In this case we return early and don't swap, which
would cause drawing artifacts.
Bug: 5476838
Change-Id: Id3b7bf4b7aabec7919c50d9278eb2165973a4c3d
when taking a screenshot, in particular, we could end up
with stale GL state when drawing LayerDim which resulted
in incortect rendering.
Bug: 5467587
Change-Id: Id9fbed2843481d31063620f3662b364c7e3ac781
removed a test that could violate this guarantee. note that we
have no proof tha this ever happened, but consequences could be
hard lock-ups.
the code here was intended to track the region to update for displays
that can do partial update. the logic discarded the update entirely
if that region was empty. instead we just redraw the whole thing
(note that we should never be there with an empty region and retired
buffers though).
Bug: 5466259
Change-Id: I91ccab3b1a599e729e438eb833939e2236da6854
This change removes the dead code from SurfaceFlinger that resulted from
disabling support for freezing the display.
Change-Id: I4e5ff00c94b4c7a79af2f65c9850c135210068ed
This change adds two tests for SurfaceFlinger's behavior when updating
the position and size of a layer.
Change-Id: Id5e3ca1d7e629a3bd2c2d28275d80c7f9256d6da
This change enables a layer or orientation update transaction sent to
SurfaceFlinger to explicitly request a synchronous transaction.
Change-Id: I97cbba610c13679849f66114b216fa6dbf12f2a9
A LayerScreenshot is a special type of layer that contains a screenshot of
the screen acquired when its created. It works just like LayerDim.
Bug: 5446982
Change-Id: I7814aff2380e7e146937f2b641907be2a30c76cc
This change merges the ISurfaceComposer::setOrientation functionality
into ISurfaceComposer::setTransactionState. It enables the window
manager to atomically update both the display orientation and the
position and size of the windows in a single transaction with
SurfaceFlinger.
Bug: 5439574
Change-Id: I18a8ccc564d7d760ef8afb2d015ccdb7a7963900
this would happen when toggling on/off/on very fast, the screen
could stay black (while the panel is on).
Bug: 5429724
Change-Id: Ic8aa6aff066e6267923c0d47ef65e314e7bb6d41