summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alec Mouri <alecmouri@google.com> 2019-02-22 02:52:50 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-02-22 02:52:50 +0000
commitb69cd650f8f137ab6abada933995e03355276e07 (patch)
tree582879d2ac43735588f9f012e232ff41a0d7f616
parent77be1fecfcb020edf9691b6056142c82ac733f3e (diff)
parentfe3dc94058fcf8aa3bfa59333b20c371e2f9d0dc (diff)
Merge "More accurate frames missed for client composited frames."
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index ff6660cd73..abf38fa548 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1000,6 +1000,7 @@ void SurfaceFlinger::setActiveConfigInternal() {
}
bool SurfaceFlinger::performSetActiveConfig() NO_THREAD_SAFETY_ANALYSIS {
+ ATRACE_CALL();
// we may be in the process of changing the active state
if (mWaitForNextInvalidate) {
mWaitForNextInvalidate = false;
@@ -1512,6 +1513,7 @@ void SurfaceFlinger::resetDisplayState() {
}
void SurfaceFlinger::updateVrFlinger() {
+ ATRACE_CALL();
if (!mVrFlinger)
return;
bool vrFlingerRequestsDisplay = mVrFlingerRequestsDisplay;
@@ -1606,13 +1608,16 @@ void SurfaceFlinger::onMessageReceived(int32_t what) {
// of video detection feature.
mScheduler->incrementFrameCounter();
}
-
- bool frameMissed = !mHadClientComposition && mPreviousPresentFence != Fence::NO_FENCE &&
+ bool frameMissed = mPreviousPresentFence != Fence::NO_FENCE &&
(mPreviousPresentFence->getStatus() == Fence::Status::Unsignaled);
- mFrameMissedCount += frameMissed;
- ATRACE_INT("FrameMissed", static_cast<int>(frameMissed));
+ bool hwcFrameMissed = !mHadClientComposition && frameMissed;
if (frameMissed) {
+ ATRACE_INT("FrameMissed", static_cast<int>(frameMissed));
+ mFrameMissedCount++;
mTimeStats->incrementMissedFrames();
+ }
+ // For now, only propagate backpressure when missing a hwc frame.
+ if (hwcFrameMissed) {
if (mPropagateBackpressure) {
signalLayerUpdate();
break;
@@ -1647,6 +1652,7 @@ void SurfaceFlinger::onMessageReceived(int32_t what) {
}
bool SurfaceFlinger::handleMessageTransaction() {
+ ATRACE_CALL();
uint32_t transactionFlags = peekTransactionFlags();
// Apply any ready transactions in the queues if there are still transactions that have not been