summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2017-09-11 22:00:02 +0000
committer android-build-merger <android-build-merger@google.com> 2017-09-11 22:00:02 +0000
commit91cf84cda246e83bfb92ea91ca892e1d22cc7bae (patch)
treea67a4358ec0319951f55522317064481406fabba /libs/hwui/renderthread
parent648ef4db4eb52f0ca1fcb780af36df4b1cfc65b3 (diff)
parenta0c211120adaa7b135b2d08e8ccc1fc380832817 (diff)
Merge "Fix flicker from multiwindow resize" into oc-mr1-dev am: facdce3ab2
am: a0c211120a Change-Id: I701b817d0109c650069d445548280bec4193729d
Diffstat (limited to 'libs/hwui/renderthread')
-rw-r--r--libs/hwui/renderthread/CanvasContext.h4
-rw-r--r--libs/hwui/renderthread/DrawFrameTask.cpp2
-rw-r--r--libs/hwui/renderthread/DrawFrameTask.h4
-rw-r--r--libs/hwui/renderthread/RenderProxy.cpp14
4 files changed, 9 insertions, 15 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index aa6d2f3513d7..4a5b2c72b02a 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -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() {
diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp
index 7d641d3ac7c7..a097272df359 100644
--- a/libs/hwui/renderthread/DrawFrameTask.cpp
+++ b/libs/hwui/renderthread/DrawFrameTask.cpp
@@ -32,6 +32,7 @@ namespace renderthread {
DrawFrameTask::DrawFrameTask()
: mRenderThread(nullptr)
, mContext(nullptr)
+ , mContentDrawBounds(0, 0, 0, 0)
, mSyncResult(SyncResult::OK) {
}
@@ -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
diff --git a/libs/hwui/renderthread/DrawFrameTask.h b/libs/hwui/renderthread/DrawFrameTask.h
index fb480626d421..83ecb98f548f 100644
--- a/libs/hwui/renderthread/DrawFrameTask.h
+++ b/libs/hwui/renderthread/DrawFrameTask.h
@@ -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);
@@ -82,6 +85,7 @@ private:
RenderThread* mRenderThread;
CanvasContext* mContext;
RenderNode* mTargetNode = nullptr;
+ Rect mContentDrawBounds;
/*********************************************
* Single frame data
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 690474376bef..a6aa301021e2 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -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) {