Loading libs/hwui/renderthread/CanvasContext.h +2 −2 Original line number Diff line number Diff line Loading @@ -162,8 +162,8 @@ public: void addRenderNode(RenderNode* node, bool placeFront); void removeRenderNode(RenderNode* node); void setContentDrawBounds(int left, int top, int right, int bottom) { mContentDrawBounds.set(left, top, right, bottom); void setContentDrawBounds(const Rect& bounds) { mContentDrawBounds = bounds; } RenderState& getRenderState() { Loading libs/hwui/renderthread/DrawFrameTask.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ namespace renderthread { DrawFrameTask::DrawFrameTask() : mRenderThread(nullptr) , mContext(nullptr) , mContentDrawBounds(0, 0, 0, 0) , mSyncResult(SyncResult::OK) { } Loading Loading @@ -123,6 +124,7 @@ bool DrawFrameTask::syncFrameState(TreeInfo& info) { mLayers[i]->apply(); } mLayers.clear(); mContext->setContentDrawBounds(mContentDrawBounds); mContext->prepareTree(info, mFrameInfo, mSyncQueued, mTargetNode); // This is after the prepareTree so that any pending operations Loading libs/hwui/renderthread/DrawFrameTask.h +4 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,9 @@ public: virtual ~DrawFrameTask(); void setContext(RenderThread* thread, CanvasContext* context, RenderNode* targetNode); void setContentDrawBounds(int left, int top, int right, int bottom) { mContentDrawBounds.set(left, top, right, bottom); } void pushLayerUpdate(DeferredLayerUpdater* layer); void removeLayerUpdate(DeferredLayerUpdater* layer); Loading @@ -82,6 +85,7 @@ private: RenderThread* mRenderThread; CanvasContext* mContext; RenderNode* mTargetNode = nullptr; Rect mContentDrawBounds; /********************************************* * Single frame data Loading libs/hwui/renderthread/RenderProxy.cpp +1 −13 Original line number Diff line number Diff line Loading @@ -551,20 +551,8 @@ void RenderProxy::drawRenderNode(RenderNode* node) { staticPostAndWait(task); } CREATE_BRIDGE5(setContentDrawBounds, CanvasContext* context, int left, int top, int right, int bottom) { args->context->setContentDrawBounds(args->left, args->top, args->right, args->bottom); return nullptr; } void RenderProxy::setContentDrawBounds(int left, int top, int right, int bottom) { SETUP_TASK(setContentDrawBounds); args->context = mContext; args->left = left; args->top = top; args->right = right; args->bottom = bottom; staticPostAndWait(task); mDrawFrameTask.setContentDrawBounds(left, top, right, bottom); } CREATE_BRIDGE1(serializeDisplayListTree, CanvasContext* context) { Loading Loading
libs/hwui/renderthread/CanvasContext.h +2 −2 Original line number Diff line number Diff line Loading @@ -162,8 +162,8 @@ public: void addRenderNode(RenderNode* node, bool placeFront); void removeRenderNode(RenderNode* node); void setContentDrawBounds(int left, int top, int right, int bottom) { mContentDrawBounds.set(left, top, right, bottom); void setContentDrawBounds(const Rect& bounds) { mContentDrawBounds = bounds; } RenderState& getRenderState() { Loading
libs/hwui/renderthread/DrawFrameTask.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ namespace renderthread { DrawFrameTask::DrawFrameTask() : mRenderThread(nullptr) , mContext(nullptr) , mContentDrawBounds(0, 0, 0, 0) , mSyncResult(SyncResult::OK) { } Loading Loading @@ -123,6 +124,7 @@ bool DrawFrameTask::syncFrameState(TreeInfo& info) { mLayers[i]->apply(); } mLayers.clear(); mContext->setContentDrawBounds(mContentDrawBounds); mContext->prepareTree(info, mFrameInfo, mSyncQueued, mTargetNode); // This is after the prepareTree so that any pending operations Loading
libs/hwui/renderthread/DrawFrameTask.h +4 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,9 @@ public: virtual ~DrawFrameTask(); void setContext(RenderThread* thread, CanvasContext* context, RenderNode* targetNode); void setContentDrawBounds(int left, int top, int right, int bottom) { mContentDrawBounds.set(left, top, right, bottom); } void pushLayerUpdate(DeferredLayerUpdater* layer); void removeLayerUpdate(DeferredLayerUpdater* layer); Loading @@ -82,6 +85,7 @@ private: RenderThread* mRenderThread; CanvasContext* mContext; RenderNode* mTargetNode = nullptr; Rect mContentDrawBounds; /********************************************* * Single frame data Loading
libs/hwui/renderthread/RenderProxy.cpp +1 −13 Original line number Diff line number Diff line Loading @@ -551,20 +551,8 @@ void RenderProxy::drawRenderNode(RenderNode* node) { staticPostAndWait(task); } CREATE_BRIDGE5(setContentDrawBounds, CanvasContext* context, int left, int top, int right, int bottom) { args->context->setContentDrawBounds(args->left, args->top, args->right, args->bottom); return nullptr; } void RenderProxy::setContentDrawBounds(int left, int top, int right, int bottom) { SETUP_TASK(setContentDrawBounds); args->context = mContext; args->left = left; args->top = top; args->right = right; args->bottom = bottom; staticPostAndWait(task); mDrawFrameTask.setContentDrawBounds(left, top, right, bottom); } CREATE_BRIDGE1(serializeDisplayListTree, CanvasContext* context) { Loading