Merge "Drop less aggressively" into nyc-mr1-dev
This commit is contained in:
@@ -199,6 +199,8 @@ static bool wasSkipped(FrameInfo* info) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool CanvasContext::isSwapChainStuffed() {
|
bool CanvasContext::isSwapChainStuffed() {
|
||||||
|
static const auto SLOW_THRESHOLD = 6_ms;
|
||||||
|
|
||||||
if (mSwapHistory.size() != mSwapHistory.capacity()) {
|
if (mSwapHistory.size() != mSwapHistory.capacity()) {
|
||||||
// We want at least 3 frames of history before attempting to
|
// We want at least 3 frames of history before attempting to
|
||||||
// guess if the queue is stuffed
|
// guess if the queue is stuffed
|
||||||
@@ -209,8 +211,8 @@ bool CanvasContext::isSwapChainStuffed() {
|
|||||||
|
|
||||||
// Was there a happy queue & dequeue time? If so, don't
|
// Was there a happy queue & dequeue time? If so, don't
|
||||||
// consider it stuffed
|
// consider it stuffed
|
||||||
if (swapA.dequeueDuration < 3_ms
|
if (swapA.dequeueDuration < SLOW_THRESHOLD
|
||||||
&& swapA.queueDuration < 3_ms) {
|
&& swapA.queueDuration < SLOW_THRESHOLD) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,8 +227,8 @@ bool CanvasContext::isSwapChainStuffed() {
|
|||||||
|
|
||||||
// Was there a happy queue & dequeue time? If so, don't
|
// Was there a happy queue & dequeue time? If so, don't
|
||||||
// consider it stuffed
|
// consider it stuffed
|
||||||
if (swapB.dequeueDuration < 3_ms
|
if (swapB.dequeueDuration < SLOW_THRESHOLD
|
||||||
&& swapB.queueDuration < 3_ms) {
|
&& swapB.queueDuration < SLOW_THRESHOLD) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user