diff options
author | Chris Craik <ccraik@google.com> | 2014-04-08 18:17:07 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2014-04-08 18:17:07 -0700 |
commit | defb7f37fe67ef2389666f7adc5da1260df87017 (patch) | |
tree | 53011a92b1a2a475d5d2e815343ac328dcbbeb32 /libs/hwui | |
parent | ff17bc9cac2f9b178fcbfe3a0af307b4d16c2389 (diff) | |
download | frameworks_base-defb7f37fe67ef2389666f7adc5da1260df87017.zip frameworks_base-defb7f37fe67ef2389666f7adc5da1260df87017.tar.gz frameworks_base-defb7f37fe67ef2389666f7adc5da1260df87017.tar.bz2 |
When recording a child node into a parent, read staging projection property
bug:13770920
The other properties should not be read from the UI thread.
Change-Id: I61d13774553d46a8963623727d8e8eeeb3385cc9
Diffstat (limited to 'libs/hwui')
-rw-r--r-- | libs/hwui/DisplayListRenderer.cpp | 4 | ||||
-rw-r--r-- | libs/hwui/RenderNode.h | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp index a84aa6b..140a07a 100644 --- a/libs/hwui/DisplayListRenderer.cpp +++ b/libs/hwui/DisplayListRenderer.cpp @@ -192,7 +192,9 @@ status_t DisplayListRenderer::drawDisplayList(RenderNode* displayList, flags, *currentTransform()); addDrawOp(op); mDisplayListData->addChild(op); - if (displayList->isProjectionReceiver()) { + + if (displayList->stagingProperties().isProjectionReceiver()) { + // use staging property, since recording on UI thread mDisplayListData->projectionReceiveIndex = mDisplayListData->displayListOps.size() - 1; } diff --git a/libs/hwui/RenderNode.h b/libs/hwui/RenderNode.h index fd0fabc..fa0fb8a 100644 --- a/libs/hwui/RenderNode.h +++ b/libs/hwui/RenderNode.h @@ -105,6 +105,10 @@ public: return mDisplayListData && mDisplayListData->hasDrawOps; } + const char* getName() const { + return mName.string(); + } + void setName(const char* name) { if (name) { char* lastPeriod = strrchr(name, '.'); @@ -129,10 +133,6 @@ public: return mStagingProperties; } - bool isProjectionReceiver() { - return properties().isProjectionReceiver(); - } - int getWidth() { return properties().getWidth(); } |