Add more RenderNode property support in OpReorderer path
Change-Id: I0163fe91d8145e33019739c191bbab0432a5f9aa
diff --git a/libs/hwui/unit_tests/TestUtils.h b/libs/hwui/unit_tests/TestUtils.h
index 770f413..0cf8040 100644
--- a/libs/hwui/unit_tests/TestUtils.h
+++ b/libs/hwui/unit_tests/TestUtils.h
@@ -16,6 +16,7 @@
#ifndef TEST_UTILS_H
#define TEST_UTILS_H
+#include <DeviceInfo.h>
#include <Matrix.h>
#include <Rect.h>
#include <RenderNode.h>
@@ -90,6 +91,10 @@
}
static sp<RenderNode> createNode(int left, int top, int right, int bottom, bool onLayer = false) {
+ // if RenderNodes are being sync'd/used, device info will be needed, since
+ // DeviceInfo::maxTextureSize() affects layer property
+ DeviceInfo::initialize();
+
sp<RenderNode> node = new RenderNode();
node->mutateStagingProperties().setLeftTopRightBottom(left, top, right, bottom);
node->setPropertyFieldsDirty(RenderNode::X | RenderNode::Y);