summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2016-07-27 19:28:05 -0700
committerJohn Reck <jreck@google.com>2016-07-27 19:28:05 -0700
commita3d795a34a786bbe8b5027f70df36b81328109c2 (patch)
treec4e8767cf647ddf5ad349bddbd62af5c09050d64 /libs
parent255ad67b2e61c5ac407c5ef539275b4de99186b4 (diff)
downloadandroid-frameworks-base-a3d795a34a786bbe8b5027f70df36b81328109c2.tar.gz
android-frameworks-base-a3d795a34a786bbe8b5027f70df36b81328109c2.tar.xz
Drop less aggressively
Bug: 30342762 Frame dropping was too frequent and would trigger during normal triple buffering steady state. Bump the threshold to drop from 3ms stall to 6ms stall. Change-Id: I5c1faeaabf0d02323a28e697a4af4105fbcf1c53
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 4b9d7d5..82684c5 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -199,6 +199,8 @@ static bool wasSkipped(FrameInfo* info) {
}
bool CanvasContext::isSwapChainStuffed() {
+ static const auto SLOW_THRESHOLD = 6_ms;
+
if (mSwapHistory.size() != mSwapHistory.capacity()) {
// We want at least 3 frames of history before attempting to
// guess if the queue is stuffed
@@ -209,8 +211,8 @@ bool CanvasContext::isSwapChainStuffed() {
// Was there a happy queue & dequeue time? If so, don't
// consider it stuffed
- if (swapA.dequeueDuration < 3_ms
- && swapA.queueDuration < 3_ms) {
+ if (swapA.dequeueDuration < SLOW_THRESHOLD
+ && swapA.queueDuration < SLOW_THRESHOLD) {
return false;
}
@@ -225,8 +227,8 @@ bool CanvasContext::isSwapChainStuffed() {
// Was there a happy queue & dequeue time? If so, don't
// consider it stuffed
- if (swapB.dequeueDuration < 3_ms
- && swapB.queueDuration < 3_ms) {
+ if (swapB.dequeueDuration < SLOW_THRESHOLD
+ && swapB.queueDuration < SLOW_THRESHOLD) {
return false;
}