This forces all SurfaceFlinger sources to be recompiled when the
Makefile changes; that's overkill sometimes but makes sure everything
gets recompiled when compile options (or similar) changes.
Change-Id: I2b3c3090fc1c35078e13c77fbb1a78d447c39158
The existing code worked in practice, but wasn't quite correct in
theory and relied on implementation details of other code. It's still
somewhat unusual and subtle, but now is correct-in-theory (I believe)
and a little better documented.
Bug: 16044767
Change-Id: I22b01d6640f0b7beca7cbfc74981795a3218b064
(cherry picked from commit c61576794e)
This is necessary to use C11/C++11 stdlib atomics, which the next
change will do. This change also fixes a couple bits of syntax that
both GCC and Clang refuse to compile in -std=c++11 mode.
Change-Id: Ia14d9d6b537a3bb106c23e19a277e48be180754c
Removes the dependency on default constructor parameters for
GLConsumer so that a different constructor prototype can safely be
added.
Change-Id: I0da924bbd4c141edbf305598c1be8bc575654680
This adds an allocateBuffers method to BufferQueue, which instructs
it to allocate up to the maximum number of buffers allowed by the
current configuration. The goal is that this method can be called
ahead of render time, which will prevent dequeueBuffers from blocking
in allocation and inducing jank.
This interface is also plumbed up to the native Surface (and, in
another change, up to the Java Surface and ThreadedRenderer).
Bug: 11792166
Change-Id: I4aa96b4351ea1c95ed5db228ca3ef98303229c74
VSYNC power hints are now sent via binder to IPowerManager.
SurfaceFlinger no longer loads a second copy of the PowerHAL.
VSYNC power hints are sent in batches and not on per frame basis.
Change-Id: Ia5a839ab3c857cffae7089f810b4315d4ed23fcf
Rects' right and bottom edges are treated as exclusive, so when
checking against maximum width and height, we should use > instead
of >=.
Change-Id: Ifcdf6813c13fcab1a55f16c21064e765e93d49f0
This replaces the previous low-power mode experiment, which
discarded refresh events, with a new experiment that alters
the refresh period.
(see also I2849e5ea335c0d2509fea1c315392bce7f20451d )
The feature is enabled by specifying a nonzero value for the
"refresh skip count", which indicates the number of periods
to skip. For example, the command:
adb shell service call SurfaceFlinger 1016 i32 1
sets a skip count of '1', yielding a 30Hz refresh rate on a device
with a 60Hz display. Changing the last value to '2' would set the
refresh to 20Hz. '0' returns to the default behavior.
Bug 15523257
Change-Id: I00039c22a55750e74035644c63800e4bee1c774a
If app and SF events aren't using phase offsets, we don't need
to maintain the DispSync model. We just turn hardware VSYNC on
whenever something wants to draw. This avoids some edge cases
where we were doing too much resync work.
Also, updated the systrace output. The "VsyncOn" line was a
combination of SF and app event threads, and would occasionally
be very weird. Removed VsyncOn, renamed VSYNC to VSYNC-app,
and added VSYNC-sf.
Also, added more details to the --dispsync dumpsys output.
Also, renamed global constants to not look like local variables.
Bug 15516453
Change-Id: I0da10b72f0d9a7b7eb5202d87cc18967f698adbd
We replace the blank/unblank calls in surfaceFlinger with a more generic
setPowerMode() routine.
Some displays support different power modes (for example, with reduced
color palettes). Depending on the use case we should be able to toggle
these modes, so as to achieve incremental power savings.
Initially, three power modes will be supported:
- HWC_POWER_MODE_OFF
- HWC_POWER_MODE_DOZE
- HWC_POWER_MODE_NORMAL
HWC_POWER_MODE_OFF will correspond to blanking the display, while
HWC_POWER_MODE_NORMAL will correspond to unblanking. HWC_POWER_MODE_DOZE
will put the display into a low power setting, if it is supported in
hardware.
If such a low power mode is not supported, it should be treated as a
call to set the mode to HWC_POWER_MODE_NORMAL.
As a consequence of adding the mPowerMode field, the mScreenAcquired is
no longer required, and thus references to it are removed and replaced
equivalent references to mPowerMode.
We also add the glue code to connect the services invocation of setting
a power mode and the HAL implementation in HWComposer.
Bug: 13472578
Change-Id: I431595ecf16d2f2c94259272db3dd42f29636204
Signed-off-by: Prashant Malani <pmalani@google.com>
Adds a sourceCrop Rect parameter to screenshot commands, which allows
clients to capture only a portion of the screen instead of the whole
screen.
Bug: 15137922
Change-Id: I629447573cd34ffb96334cde7ba02490b9ea06d8
The "dumpsys SurfaceFlinger" output shows pixel formats in
human-readable form now. Add IMPLEMENTATION_DEFINED.
Change-Id: If567e34dad4b940fbfb4d0b70c65f6ab8cd5f5e7
Dumps the current DispSync state.
Bug 14651879
(this is a near-cherrypick of Ide4e6dbd58b117bc1a6b97b57d10cd92ec86dc84)
Change-Id: I6e6c8452ede5c2d5098db1b884d28226e77d9a03
This allows querying and switching display device configurations
through the ISurfaceComposer/SurfaceComposerClient interface.
Bug: 14320401
Change-Id: I8c22165698950e5da32204c1c4da92122f91a715
This ensures it's the same size in both 32 and 64 bit
processes and also brings it in line with struct
MotionEntry.
Change-Id: I66bb8b8d8664763e7dcbd489686051f563d5e1dc