this should be handled by the display-manager. we were doing
that in SF because until recently we didn't have enough support
in the HAL. however, this is now causing other problems when
plugging hdmi while the screen is off for instance.
Bug: 7150885
Change-Id: I739b209056a765d38d05295cf202f67ee0f506ae
DdmHandleAppName.setAppName() signature changed which broke
this debugging feature.
Needed for debugging b\7267680
Change-Id: I4482bf5a441e91bef89d1ddea9a4152333be7f88
This needs the ConsumerBase mutex locked, but wasn't locking it. Two
of the four places that called it already held the lock so were fine.
Now addReleaseFence() takes the lock itself, and I added
addReleaseFenceLocked() for the two already-locked callers, since in
one of them dropping the lock would be inconvenient.
Bug: 7289269
Change-Id: I7a5628adb516f8eec782aa6c14128202f96d7b0a
The new disconnectDisplay function doesn't handle virtual displays,
but it may be called for them. Return without doing anything.
Bug 7281786
Change-Id: I62607f2ae6073fa66b393f55932604aeb8e03566
The CleanSpec is missing parens, which causes $P to be interpreted as a
single variable, and the following printed to the log:
Clean step: rm -rf RODUCT_OUT/obj/SHARED_LIBRARIES/libgui_intermediates
This patch adds parens as needed.
Change-Id: I587998fa67a4884418c286360a577cdbb6ea9a21
When a display is disconnected, removing it from SurfaceFlinger's
display list is non-atomic with removing it from the Display Manager
and any in-flight transactions. So SurfaceFlinger might get a display
state change transaction for a display it has already forgotten about.
Just ignore these.
Bug: 7288082
Change-Id: Ic27e55377f3db40fb34e3b1cd67e43297df117a2
when enabling/disabling vsync we now make sure to
not call into the HAL if the state wouldn't change.
Bug: 7274951
Change-Id: Ie24a6d68888a51b577acf9c2a973d85437cbacaf
The display was being removed from SurfaceFlinger's list before we
had a chance to reset HWComposer's layer list, so we were passing
stale data into the hardware composer (which has its own per-display
data). This resulted in "invalid gralloc handle" complaints.
We now clear the layer list immediately after removing the display.
The display was being removed while its EGLSurface was still
"current", resulting in "cancelBuffer: BufferQueue has been
abandoned" complaints. We now call makeCurrent on the primary
display before removing the external display.
Bug 7274254
Change-Id: Ia59e3a61d7ec46488b96bf93ec5e4ed3488b70e4
This change adds debug info to SurfaceFlinger's dumpsys to indicate that the
USE_WAIT_SYNC compile option was enabled, and it removes the
ALLOW_DEQUEUE_CURRENT_BUFFER option.
Bug: 7238122
Change-Id: I70e08e34c2ef58aa6d2f88229e781a119f84b5a9
This reverts commit bdf277355d.
This reverts commit dc5b63e40e.
it might be responsible for a regression that makes the
rotation vector spin.
Bug: 7267330
Change-Id: Ifb10e933537e70c1d85a7ba73a7e3ae59002fe62
This change makes SurfaceFlinger reset the acquire fence fd to -1 after each
call to HWComposer::commit. The HWComposer implementation is resonsible for
closing the fd, so SurfaceFlinger should make sure not to pass it to HWC
multiple times.
Change-Id: I79554d9f6d6ef2b77d632d40251516c1f5b16ddb
Bug: 7258954
This allows us to blank and unblank displays other than the built-in
display (e.g. HDMI).
Bug: 7240511
Change-Id: I89ea13f9e497be74c3e1231d0c62fb558e93e0f8
This change fixes a bug in SurfaceFlinger that caused the HWC_GEOMETRY_CHANGED
flag to be set every flip.
Change-Id: I4f395a2883bcbb53b23b3d14941aff108739c9f0
Bug: 7234237
Some of the code in latchBuffer was calling invalidateHwcGeometry,
but that didn't cause the SurfaceFlinger visible region code to
re-evaluate the layer's visibility. Set the recomputeVisibleRegions
"out" parameter instead.
Bug 7235797
Change-Id: If6ba33fbd1a594cd64cc5253aebf752d6ceda1c9
The transparent region hint is computed only from view layout
locations, ignoring post-layout translation. If a SurfaceView is layed
out with no other views above it, but a view is moved above it
post-layout, that view's layout bounds would be subtracted from the
window's transparent region instead of its drawing bounds. Prior to
this change, the view would not be visible (except where its layout
bounds and drawing bounds overlap).
With this change, composition uses visible regions computed without
regard to the transparent regions. However, if all of a layer's
visible region is transparent, it will be removed from the list of
layers to composite. This doesn't fix the root problem of incorrect
transparent regions, and doesn't prevent bad composition in all cases.
But it does avoid it for some existing apps, whiel still allowing the
transparent region hint to save power in the important
fullscreen-video-in-a-SurfaceView case.
Bug: 7179570
Change-Id: I47cf939e12129b167afa344b8b036e8827103ac8
we now try first with EGL_FRAMEBUFFER_TARGET_ANDROID, and
pick the first config we find. Otherwise, we revert to
the old algorithm.
Bug: 7232584
Change-Id: I8d5c5a4ce48420832c2e2828718a8f53325effb0
MemoryHeapBase::getBase() returns MAP_FAILED in case or
OOM, not null which is what SF was checking against.
This addresses one of the issues of bug 7230543.
Bug: 7230543
Change-Id: I763a88f64a2f9ff75eb139cfbaf9a1a9746c5577