summaryrefslogtreecommitdiffstats
path: root/libs/hwui/renderthread
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-06-02 15:55:00 -0700
committerJohn Reck <jreck@google.com>2015-06-02 16:13:56 -0700
commitbf3c602284f9a344faf185c3a5e94a264ba44c4f (patch)
treefdf404c8f4f4859290157229cc1689ed5b0b1df7 /libs/hwui/renderthread
parent233241f13d5d7f841d3db80408429d4d0a528c78 (diff)
downloadframeworks_base-bf3c602284f9a344faf185c3a5e94a264ba44c4f.zip
frameworks_base-bf3c602284f9a344faf185c3a5e94a264ba44c4f.tar.gz
frameworks_base-bf3c602284f9a344faf185c3a5e94a264ba44c4f.tar.bz2
More colors, now with material colors
Bug: 18052916 Change-Id: I66c2573d796338ee7b7d0ddf240b90cc78a71ce5
Diffstat (limited to 'libs/hwui/renderthread')
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 706e14e..f9af15f 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -156,10 +156,18 @@ void CanvasContext::processLayerUpdate(DeferredLayerUpdater* layerUpdater) {
}
}
+static bool wasSkipped(FrameInfo* info) {
+ return info && ((*info)[FrameInfoIndex::kFlags] & FrameInfoFlags::kSkippedFrame);
+}
+
void CanvasContext::prepareTree(TreeInfo& info, int64_t* uiFrameInfo) {
mRenderThread.removeFrameCallback(this);
- mCurrentFrameInfo = &mFrames.next();
+ // If the previous frame was dropped we don't need to hold onto it, so
+ // just keep using the previous frame's structure instead
+ if (!wasSkipped(mCurrentFrameInfo)) {
+ mCurrentFrameInfo = &mFrames.next();
+ }
mCurrentFrameInfo->importUiThreadInfo(uiFrameInfo);
mCurrentFrameInfo->markSyncStart();