Attempting to fix the black flicker
Bug: 79231206
Test: Repro steps from bug
Change-Id: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
diff --git a/libs/hwui/renderthread/DrawFrameTask.h b/libs/hwui/renderthread/DrawFrameTask.h
index 0037a0f..696cfaef 100644
--- a/libs/hwui/renderthread/DrawFrameTask.h
+++ b/libs/hwui/renderthread/DrawFrameTask.h
@@ -45,6 +45,7 @@
UIRedrawRequired = 1 << 0,
LostSurfaceRewardIfFound = 1 << 1,
ContextIsStopped = 1 << 2,
+ FrameDropped = 1 << 3,
};
}
@@ -77,6 +78,10 @@
mFrameCallback = std::move(callback);
}
+ void setFrameCompleteCallback(std::function<void(int64_t)>&& callback) {
+ mFrameCompleteCallback = std::move(callback);
+ }
+
private:
void postAndWait();
bool syncFrameState(TreeInfo& info);
@@ -101,6 +106,7 @@
int64_t mFrameInfo[UI_THREAD_FRAME_INFO_SIZE];
std::function<void(int64_t)> mFrameCallback;
+ std::function<void(int64_t)> mFrameCompleteCallback;
};
} /* namespace renderthread */