summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/CanvasContext.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2016-06-10 16:01:55 -0700
committerJohn Reck <jreck@google.com>2016-06-10 16:28:59 -0700
commit306f331f91a86da271ce30d4f14d6badf0d25704 (patch)
tree40a92237e50da143f7d076c2ed304a7a8d950519 /libs/hwui/renderthread/CanvasContext.cpp
parent9b5a78072281ebf0182234d56b6ec174e911d24e (diff)
Redraw if dirty during stopped when resumed
Change-Id: I0034d1da7704de53c4ba3da3e8ef3109445f9e6a Fixes: 28283031
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index e6399d4ec789..c626c5452310 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -149,6 +149,8 @@ void CanvasContext::setStopped(bool stopped) {
if (mEglManager.isCurrent(mEglSurface)) {
mEglManager.makeCurrent(EGL_NO_SURFACE);
}
+ } else if (mIsDirty && hasSurface()) {
+ mRenderThread.postFrameCallback(this);
}
}
}
@@ -231,6 +233,8 @@ void CanvasContext::prepareTree(TreeInfo& info, int64_t* uiFrameInfo,
freePrefetchedLayers(info.observer);
GL_CHECKPOINT(MODERATE);
+ mIsDirty = true;
+
if (CC_UNLIKELY(!mNativeSurface.get())) {
mCurrentFrameInfo->addFlag(FrameInfoFlags::SkippedFrame);
info.out.canDrawThisFrame = false;
@@ -503,6 +507,7 @@ void CanvasContext::draw() {
// Even if we decided to cancel the frame, from the perspective of jank
// metrics the frame was swapped at this point
mCurrentFrameInfo->markSwapBuffers();
+ mIsDirty = false;
if (drew || mEglManager.damageRequiresSwap()) {
if (CC_UNLIKELY(!mEglManager.swapBuffers(frame, screenDirty))) {