summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2016-07-28 19:59:12 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-07-28 19:59:13 +0000
commitabf66de14702c1d8262be29c426f707cc74667af (patch)
treeb508072b900bd2e032c64691b9be1d80bd3f3724 /libs
parent3a45979ab0ee4973a1ff5845943121e542ff7960 (diff)
parenta3d795a34a786bbe8b5027f70df36b81328109c2 (diff)
downloadandroid-frameworks-base-abf66de14702c1d8262be29c426f707cc74667af.tar.gz
android-frameworks-base-abf66de14702c1d8262be29c426f707cc74667af.tar.xz
Merge "Drop less aggressively" into nyc-mr1-dev
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;
}