diff options
author | John Reck <jreck@google.com> | 2015-06-02 23:16:22 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-02 23:16:31 +0000 |
commit | 6058251939e417ed764d76fbde77eefc964d0ee6 (patch) | |
tree | ec5b7b222d704227a23e05ad45fa5d8107a32923 /libs/hwui/renderthread/CanvasContext.cpp | |
parent | 4e14da5695b5457ae7da53c7f3079c71e37b2e19 (diff) | |
parent | bf3c602284f9a344faf185c3a5e94a264ba44c4f (diff) |
Merge "More colors, now with material colors" into mnc-dev
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index b5d7346cbea8..f8490b6c9aba 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(); |