From 627c6fd91377ead85f74a365438e25610ef1e2ee Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Wed, 21 Aug 2013 11:53:18 -0700 Subject: Add overdraw debugging that accounts for Deuteranomaly Change-Id: I31f68a07aa7cf0490d2572e24e4c5ac2066a1151 --- libs/hwui/Caches.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libs/hwui/Caches.h') diff --git a/libs/hwui/Caches.h b/libs/hwui/Caches.h index f8b1e17..282aee9 100644 --- a/libs/hwui/Caches.h +++ b/libs/hwui/Caches.h @@ -150,6 +150,12 @@ public: } /** + * Returns a non-premultiplied ARGB color for the specified + * amount of overdraw (1 for 1x, 2 for 2x, etc.) + */ + uint32_t getOverdrawColor(uint32_t amount) const; + + /** * Call this on each frame to ensure that garbage is deleted from * GPU memory. */ @@ -348,6 +354,11 @@ public: PFNGLGETOBJECTLABELEXTPROC getLabel; private: + enum OverdrawColorSet { + kColorSet_Default = 0, + kColorSet_Deuteranomaly + }; + void initFont(); void initExtensions(); void initConstraints(); @@ -400,6 +411,8 @@ private: uint32_t mFunctorsCount; GLuint mBoundTextures[REQUIRED_TEXTURE_UNITS_COUNT]; + + OverdrawColorSet mOverdrawDebugColorSet; }; // class Caches }; // namespace uirenderer -- cgit v1.1