This reverts commit eeb74561b6.
Reason for revert: Causing regression with b/157096772
Change-Id: I031219588cedf5cfcb75255430f707428ed59f72
Test: Play 24fps video in YouTube PIP mode and rotate the device - no jank
Test: Chrome playing video - no refresh rate switching
Test: Hide/Show keyboard when inputting text
Test: Running Hay Day and observing refresh rate
Bug: 157096772
Bug: 157110371
This reverts commit 39db2c9b07.
Reason for revert: Causing regression with b/157096772
Change-Id: I058d6f8efa637cb36371276761281f51b7aa3dd3
Test: Play 24fps video in YouTube PIP mode and rotate the device - no jank
Test: Chrome playing video - no refresh rate switching
Test: Hide/Show keyboard when inputting text
Test: Running Hay Day and observing refresh rate
Bug: 157096772
When we render on a framebuffer with smaller size than the
currently active mode the destination clip can get outside
of the display bounds. For examlple, if the currently
active display mode is 4K, but we render on a 1080p framebuffer,
dest clip = 4k, but display bounds =1080p. As a result of that
only the top left quarter of the image is visible on screen.
Bug: 153991408
Test: manually make sure the image is properly displayed on sreen
1. boot device
2. turn off HWC with adb shell service call SurfaceFlinger 1008 i32 1
3. turn on HWC with adb shell service call SurfaceFlinger 1008 i32 1
4. start a youtube video and repeat 2 and 3.
Test: take a screenshot and check it's correctly displayed
Test: atest libsurfaceflinger_unittest librenderengine_test
Merged-In: Ia7b6ebd311c1b751c1966a34a9294b9b85a2aa0b
Change-Id: Ia7b6ebd311c1b751c1966a34a9294b9b85a2aa0b
(cherry picked from commit fcfe1360a4)
Layers that voted with FrameRateCompatibility::ExactOrMultiple
will still allow touch boost as those layers are typically not
interactive and therefore touch is probably meant for a different
layer. For the same reasoning, we should continue to heuristically
calculate frame rate for layers in the same tree.
Bug: 157254751
Test: run Swappy with statistics overlay and observe refresh rate
Test: run YouTube, play a video, scrolling the recommended videos and observe refresh rate
Change-Id: I9311512a663eba61dfcae6277a52c077e135a244
vkGetInstanceProcAddr(nullptr, ...) is valid and is effectively a
globally dispatched function, so it's consistent to support querying
vkGetInstanceProcAddr from itself without an instance.
This is required in Vulkan 1.2 and is supported for all Vulkan versions
by the loader on other platforms. To maximize app compatibility and
minimize surprises, this makes it work on Android also, even for pre-1.2
versions where the result is undefined by the spec.
Bug: 157173922
Test: dEQP-VK.api.version_check.entry_points with
https://gerrit.khronos.org/#/c/5490/ applied and modified to
check even on pre-1.2 implementations.
Change-Id: I820dd1239df54a415b7ff5db47cf2c2b349f6155
A layer will be considered frequent unless proven otherwise, in order
to make sure animations will change the refresh rate as soon as possible.
In addition, if a layer is classified infrequent, then we will keep it
infrequent until we get a burst of frames. These two policies combined
allow us to differentiate between an animating layer and a layer that
usually doesn't animate.
Bug: 157096772
Test: Play 24fps video in YouTube PIP mode and rotate the device - no jank
Test: Chrome playing video - no refresh rate switching
Test: Cursor blinking on Messages - switch to lowest refresh rate quickly
Change-Id: I3629b6e4786cd43919f51465e347f2abb52234d9
Tune the threshold for detecting inactive layers to treat 24fps
videos without presentation timestamps as frequent.
Bug: 157110371
Test: Chrome playing video and observe systrace
Change-Id: I6908761ef2af7e40cd40eda6e1e66c8e1a01393f
Some devices might takes a few frames to change the refresh rate.
Calculating the frame rate should ignore frames sent while changing
the refresh rate as those might result in an inaccurate frame rate
due to frame misses.
Bug: 156530990
Test: Running Hay Day and observing refresh rate.
Change-Id: I99f364cd1816c3ce2ba3c3145331eb618dcaea71
When DMS enforces a fixed refresh rate to hide user-visible flickering,
we must respect that refresh rate to avoid unnecessary switches during
scenarios such as idle and touch boost.
We must still respect app votes when they explicitly provide a frame
rate.
Bug: 156315203
Test: Exoplayer
Test: Modified version of SetFrameRateTest to simulate 60hz video
Test: libsurfaceflinger_unittest
Change-Id: I5fe974ddaff30e2f02e381cb63e0a6418834fdb5
Since vndservicemanager is no longer installed by default, this gets hit
on those devices.
Fixes: 156571068
Test: TH
Change-Id: I31af865326e9a69042e5c53b63637b95d6de9ad1
(cherry picked from commit 39a572183a)
Merged-In: I31af865326e9a69042e5c53b63637b95d6de9ad1
The actual problem is that default implementation is set globally.
setDefaultImpl might not work as expected when it is called twice with
different instances.
Because we don't have a proper solution for the problem, we prevent
calling setDefaultImpl() twice by aborting.
Exempt-From-Owner-Approval: approved
Bug: 140139809
Test: ./runtests.sh (in /system/tools/aidl)
Merged-In: I659d3eaad3a45dcba608fa79a08f083f84bc4d58
Change-Id: I659d3eaad3a45dcba608fa79a08f083f84bc4d58
(cherry picked from commit 81087399e9)
When content detection is off, or when we have no layer information to
make a decision, prefer the default frame rate.
Bug: 154648391
Test: - Modified a Pixel 4 to turn off content detection, idle, touch,
and power boost. Confirmed that, without this CL, we have bad
behavior where calls to setFrameRate() persist after the layer
goes away, and that this CL fixes that behavior.
- Modified and enhanced the "no layers" unit test in
RefreshRateConfigsTest.cpp.
Change-Id: I2fd0d64a6ad369580cbb2ebf91cbbed7c31e0281
Change the algorithm that chooses the refresh rate to treat layers as
infrequent unless proven otherwise. This change helps with multiple
switches during scenarios of blinking cursor where the detection of
infrequent layer is too long. The down side on this change is that
animations will be considered infrequent as well for the first few frames.
However the touch boost is a good mitigation of this.
Test: Typing in Messages and observe refresh rate
Test: Settings->About->up time and observe refresh rate
Bug: 155062712
Bug: 156654519
Change-Id: I317c69bd063df5d70f2d5705163cf61c1c9b1fff
Let linux clean it up, since this may be accessed by some threads after
the main thread is destructed.
Bug: 154507808 # longterm
Bug: 156785633
Test: w/ repro which calls defaultServiceManager off main thread
Change-Id: Ic109f4bdca3893e6b0b192ac27f3ff03ada6f9e2
(cherry picked from commit 1698ffd088)
Merged-In: Ic109f4bdca3893e6b0b192ac27f3ff03ada6f9e2
Revert submission 11485868-reland-libbinder
Testing potential culprit for b/156778943 ("pthread_mutex_destroy called on a destroyed mutex" inside libstagefright).
Reason for revert: broken above test
Exempt-From-Owner-Approval: revert due to test breakage.
Reverted Changes:
I045836e10:Use NO_IMEMORY version of libstagefright_foundatio...
I23f41fece:Revert "Revert "Make libbinder not available to me...
bug: 156778943
Change-Id: Idfea55e47cd80dc80c58bfef20e7e274f944dcaf
Add thread annotations to display state and accessors. Add macros and
RAII helpers as escape hatches that are stricter and more meaningful
than NO_THREAD_SAFETY_ANALYSIS, and emit error on use of the latter.
Bug: 123715322
Test: Build
Change-Id: Ibada81998d70c940c7406ef292b2d487fb02189d
Merged-In: Ibada81998d70c940c7406ef292b2d487fb02189d
This CL renames the variables so they are more readable and changes
snake case to camel case.
Test: m
Bug: 153991408
Change-Id: I80faa91ab514395dbf53c52282d62444c9aa579a
The Steam controller has 2 large 'paddle' buttons on the back. When used
in USB mode with hid-steam, this sends BTN_GEAR_DOWN and BTN_GEAR_UP to
the user space.
But today, these events never reach the apps, even if they have proper
mappings. This is because these buttons are not considered to be
"keyboard or gamepad". Adjust the checks to include these 2 buttons in
KeyboardInputMapper.
Test: connect Steam controller over USB and check that the paddle
buttons produce events visible in the "gamepad tester" app
Test: atest inputflinger_tests
Bug: 147434575
Change-Id: I43f221c546ccc1277d578a185465bd5eadac9e8e
When compiling BufferQueueCore for host linux, the following
warning/error occurs:
error: ignoring return value of function declared with
'warn_unused_result' attribute [-Werror,-Wunused-result]
Add a simple null check to avoid this error. This is a no-op in terms of
functionality.
Bug: 156675939
Test: m -j libgui
Change-Id: I460731ebaf0272fd5376f244e65b763da44e14f0
Turns out debug logging isn't cheap. Keeping the trace so that we can
still track it.
Bug: 144289346
Test: builds
Change-Id: I5d04f0d7821f89f1fe471ee67b165deef249ab50
We keeps around layers that explicitly voted with
setFrameRate API even if those are not visible. This is to be able
to react when those become visible.
However there is a bug in that logic that causes SurfaceFlinger to treat
explicit invisible layers as Max.
Bug: 153111478
Bug: 156506455
Test: adb shell /data/nativetest64/libsurfaceflinger_unittest/libsurfaceflinger_unittest
Change-Id: I15dde0b79bf670874edee90336caa812f791cf26