summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Caches.cpp
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-09-21 19:15:00 -0700
committerRomain Guy <romainguy@google.com>2012-09-21 19:15:00 -0700
commit7c450aaa3caac2a05fcb20a177483d0e92378426 (patch)
tree986e53542f0b59d8108b366c5d4c4d8a3f04e51e /libs/hwui/Caches.cpp
parentf7e52d92b41adf460089625ea47bfea2ed7e6296 (diff)
downloadframeworks_base-7c450aaa3caac2a05fcb20a177483d0e92378426.zip
frameworks_base-7c450aaa3caac2a05fcb20a177483d0e92378426.tar.gz
frameworks_base-7c450aaa3caac2a05fcb20a177483d0e92378426.tar.bz2
Add support for a new developer setting: overdraw debugging
Change-Id: I350ba4486577c3289f82c20938f7a35138778727
Diffstat (limited to 'libs/hwui/Caches.cpp')
-rw-r--r--libs/hwui/Caches.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp
index 068eb9e..22f1dec 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -131,6 +131,13 @@ void Caches::initProperties() {
} else {
debugLayersUpdates = false;
}
+
+ if (property_get(PROPERTY_DEBUG_OVERDRAW, property, NULL) > 0) {
+ INIT_LOGD(" Overdraw debug enabled: %s", property);
+ debugOverdraw = !strcmp(property, "true");
+ } else {
+ debugOverdraw = false;
+ }
}
void Caches::terminate() {
@@ -429,7 +436,9 @@ void Caches::resetScissor() {
void Caches::startTiling(GLuint x, GLuint y, GLuint width, GLuint height, bool opaque) {
if (extensions.hasTiledRendering()) {
- glStartTilingQCOM(x, y, width, height, opaque ? GL_NONE : GL_COLOR_BUFFER_BIT0_QCOM);
+ glStartTilingQCOM(x, y, width, height,
+ (opaque ? GL_NONE : GL_COLOR_BUFFER_BIT0_QCOM) |
+ (debugOverdraw ? GL_STENCIL_BUFFER_BIT0_QCOM : 0));
}
}