Apply dev. settings at runtime
Bug #7434649
Change-Id: I16f00eaa8a5eefd9f9849e196cf2cb1659215390
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp
index e7085b0..5c2b388 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -126,7 +126,10 @@
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize);
}
-void Caches::initProperties() {
+bool Caches::initProperties() {
+ bool prevDebugLayersUpdates = debugLayersUpdates;
+ bool prevDebugOverdraw = debugOverdraw;
+
char property[PROPERTY_VALUE_MAX];
if (property_get(PROPERTY_DEBUG_LAYERS_UPDATES, property, NULL) > 0) {
INIT_LOGD(" Layers updates debug enabled: %s", property);
@@ -141,6 +144,9 @@
} else {
debugOverdraw = false;
}
+
+ return (prevDebugLayersUpdates != debugLayersUpdates) ||
+ (prevDebugOverdraw != debugOverdraw);
}
void Caches::terminate() {