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
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 @@
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 @@
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 @@
return mStagingProperties;
}
- bool isProjectionReceiver() {
- return properties().isProjectionReceiver();
- }
-
int getWidth() {
return properties().getWidth();
}