Loading include/private/hwui/DrawGlInfo.h +6 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,12 @@ struct DrawGlInfo { kModeProcess, // Same as kModeProcess, however there is no GL context because it was // lost or destroyed kModeProcessNoContext kModeProcessNoContext, // Invoked every time the UI thread pushes over a frame to the render thread // *and the owning view has a dirty display list*. This is a signal to sync // any data that needs to be shared between the UI thread and the render thread. // During this time the UI thread is blocked. kModeSync }; /** Loading libs/hwui/DisplayList.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ namespace uirenderer { DisplayListData::DisplayListData() : projectionReceiveIndex(-1) , functorCount(0) , hasDrawOps(false) { } Loading @@ -41,7 +40,7 @@ DisplayListData::~DisplayListData() { void DisplayListData::cleanupResources() { Caches& caches = Caches::getInstance(); caches.unregisterFunctors(functorCount); caches.unregisterFunctors(functors.size()); caches.resourceCache.lock(); for (size_t i = 0; i < bitmapResources.size(); i++) { Loading libs/hwui/DisplayList.h +1 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ public: SortedVector<const SkPath*> sourcePaths; Vector<const SkRegion*> regions; Vector<Layer*> layers; uint32_t functorCount; Vector<Functor*> functors; bool hasDrawOps; bool isEmpty() { Loading libs/hwui/DisplayListRenderer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ void DisplayListRenderer::resume() { status_t DisplayListRenderer::callDrawGLFunction(Functor *functor, Rect& dirty) { // Ignore dirty during recording, it matters only when we replay addDrawOp(new (alloc()) DrawFunctorOp(functor)); mDisplayListData->functorCount++; mDisplayListData->functors.add(functor); return DrawGlInfo::kStatusDone; // No invalidate needed at record-time } Loading libs/hwui/RenderNode.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -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()); } } Loading Loading @@ -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); } } Loading @@ -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()) { Loading Loading
include/private/hwui/DrawGlInfo.h +6 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,12 @@ struct DrawGlInfo { kModeProcess, // Same as kModeProcess, however there is no GL context because it was // lost or destroyed kModeProcessNoContext kModeProcessNoContext, // Invoked every time the UI thread pushes over a frame to the render thread // *and the owning view has a dirty display list*. This is a signal to sync // any data that needs to be shared between the UI thread and the render thread. // During this time the UI thread is blocked. kModeSync }; /** Loading
libs/hwui/DisplayList.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ namespace uirenderer { DisplayListData::DisplayListData() : projectionReceiveIndex(-1) , functorCount(0) , hasDrawOps(false) { } Loading @@ -41,7 +40,7 @@ DisplayListData::~DisplayListData() { void DisplayListData::cleanupResources() { Caches& caches = Caches::getInstance(); caches.unregisterFunctors(functorCount); caches.unregisterFunctors(functors.size()); caches.resourceCache.lock(); for (size_t i = 0; i < bitmapResources.size(); i++) { Loading
libs/hwui/DisplayList.h +1 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ public: SortedVector<const SkPath*> sourcePaths; Vector<const SkRegion*> regions; Vector<Layer*> layers; uint32_t functorCount; Vector<Functor*> functors; bool hasDrawOps; bool isEmpty() { Loading
libs/hwui/DisplayListRenderer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ void DisplayListRenderer::resume() { status_t DisplayListRenderer::callDrawGLFunction(Functor *functor, Rect& dirty) { // Ignore dirty during recording, it matters only when we replay addDrawOp(new (alloc()) DrawFunctorOp(functor)); mDisplayListData->functorCount++; mDisplayListData->functors.add(functor); return DrawGlInfo::kStatusDone; // No invalidate needed at record-time } Loading
libs/hwui/RenderNode.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -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()); } } Loading Loading @@ -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); } } Loading @@ -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()) { Loading