From 09d5cddf67b676018700bcc10a72242641cd7eec Mon Sep 17 00:00:00 2001 From: John Reck Date: Thu, 24 Jul 2014 10:36:08 -0700 Subject: Add kModeSync Bug: 16526750 Change-Id: I4c087160e80432739321172fd57880846c8de6e0 --- libs/hwui/RenderNode.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libs/hwui/RenderNode.cpp') diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index 3eb779fdc509..32304dc9f7d7 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -78,7 +78,7 @@ void RenderNode::setStagingDisplayList(DisplayListData* data) { delete mStagingDisplayListData; mStagingDisplayListData = data; if (mStagingDisplayListData) { - Caches::getInstance().registerFunctors(mStagingDisplayListData->functorCount); + Caches::getInstance().registerFunctors(mStagingDisplayListData->functors.size()); } } @@ -254,6 +254,11 @@ void RenderNode::pushStagingDisplayListChanges(TreeInfo& info) { deleteDisplayListData(); mDisplayListData = mStagingDisplayListData; mStagingDisplayListData = NULL; + if (mDisplayListData) { + for (size_t i = 0; i < mDisplayListData->functors.size(); i++) { + (*mDisplayListData->functors[i])(DrawGlInfo::kModeSync, NULL); + } + } damageSelf(info); } } @@ -271,7 +276,7 @@ void RenderNode::deleteDisplayListData() { void RenderNode::prepareSubTree(TreeInfo& info, DisplayListData* subtree) { if (subtree) { TextureCache& cache = Caches::getInstance().textureCache; - info.out.hasFunctors |= subtree->functorCount; + info.out.hasFunctors |= subtree->functors.size(); // TODO: Fix ownedBitmapResources to not require disabling prepareTextures // and thus falling out of async drawing path. if (subtree->ownedBitmapResources.size()) { -- cgit v1.2.3-59-g8ed1b