summaryrefslogtreecommitdiff
path: root/libs/hwui/Program.h
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2013-02-25 14:15:37 -0800
committer Romain Guy <romainguy@google.com> 2013-02-25 15:01:58 -0800
commit3ff0bfdd144bba3b023eda8c49b25fb0d0de8653 (patch)
treecfc94ccf18fb1bfaaefb1241c700900a32276acf /libs/hwui/Program.h
parent01d159d88a51c44d7e282e07b834535e5b0e8bd1 (diff)
Add new property to debug non-rectangular clip operations
This change adds a new property called "debug.hwui.show_stencil_clip" that accepts the following values: - "highlight", colorizes in green any drawing command that's tested against a non-rectangular clip region - "region", shows the non-rectangular clip region in blue every time it is used - "hide", default value, nothing is shown Change-Id: I83c8602310edc4aaeb8b905371cdd185b17d32b5
Diffstat (limited to 'libs/hwui/Program.h')
-rw-r--r--libs/hwui/Program.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/hwui/Program.h b/libs/hwui/Program.h
index 7b67b3c3ffc3..13ee336192d7 100644
--- a/libs/hwui/Program.h
+++ b/libs/hwui/Program.h
@@ -83,6 +83,8 @@ namespace uirenderer {
#define PROGRAM_HAS_COLORS 42
+#define PROGRAM_HAS_DEBUG_HIGHLIGHT 43
+
///////////////////////////////////////////////////////////////////////////////
// Types
///////////////////////////////////////////////////////////////////////////////
@@ -159,6 +161,8 @@ struct ProgramDescription {
bool hasGammaCorrection;
float gamma;
+ bool hasDebugHighlight;
+
/**
* Resets this description. All fields are reset back to the default
* values they hold after building a new instance.
@@ -199,6 +203,8 @@ struct ProgramDescription {
hasGammaCorrection = false;
gamma = 2.2f;
+
+ hasDebugHighlight = false;
}
/**
@@ -267,6 +273,7 @@ struct ProgramDescription {
if (hasGammaCorrection) key |= programid(0x1) << PROGRAM_HAS_GAMMA_CORRECTION;
if (isSimpleGradient) key |= programid(0x1) << PROGRAM_IS_SIMPLE_GRADIENT;
if (hasColors) key |= programid(0x1) << PROGRAM_HAS_COLORS;
+ if (hasDebugHighlight) key |= programid(0x1) << PROGRAM_HAS_DEBUG_HIGHLIGHT;
return key;
}