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
diff --git a/libs/hwui/Stencil.h b/libs/hwui/Stencil.h
index 047f7ee..83ad668 100644
--- a/libs/hwui/Stencil.h
+++ b/libs/hwui/Stencil.h
@@ -87,6 +87,13 @@
return mState != kDisabled;
}
+ /**
+ * Indicates whether testing only is enabled.
+ */
+ bool isTestEnabled() {
+ return mState == kTest;
+ }
+
private:
void enable();