Move most TransformationInfo properties to RenderNode
This change dedupes the various properties that were represented both
in TransformationInfo, and RenderProperties on the native side.
RenderNode (and its associated properties) are now permanently
attached to a View in SW or HW. The native copy of these properties
are their sole representation.
Alpha to come in a later CL.
Also fixed issue with copying RenderNode's transform, and added
support of deleting RenderNodes in software rendering.
Change-Id: Ideb6e7f32b780e87aa1c32637c368356b3eee3a1
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index 34d98a1..663b67e 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -61,8 +61,12 @@
void RenderNode::destroyDisplayListDeferred(RenderNode* displayList) {
if (displayList) {
- DISPLAY_LIST_LOGD("Deferring display list destruction");
- Caches::getInstance().deleteDisplayListDeferred(displayList);
+ if (Caches::hasInstance()) {
+ DISPLAY_LIST_LOGD("Deferring display list destruction");
+ Caches::getInstance().deleteDisplayListDeferred(displayList);
+ } else {
+ delete displayList;
+ }
}
}