summaryrefslogtreecommitdiff
path: root/libs/hwui/DeviceInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/DeviceInfo.cpp')
-rw-r--r--libs/hwui/DeviceInfo.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/hwui/DeviceInfo.cpp b/libs/hwui/DeviceInfo.cpp
index 4cfbb2a43198..700642ed7334 100644
--- a/libs/hwui/DeviceInfo.cpp
+++ b/libs/hwui/DeviceInfo.cpp
@@ -41,6 +41,13 @@ void DeviceInfo::initialize() {
});
}
+void DeviceInfo::initialize(int maxTextureSize) {
+ std::call_once(sInitializedFlag, [maxTextureSize]() {
+ sDeviceInfo = new DeviceInfo();
+ sDeviceInfo->mMaxTextureSize = maxTextureSize;
+ });
+}
+
void DeviceInfo::load() {
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize);
}