summaryrefslogtreecommitdiffstats
path: root/libs/hwui/DisplayListRenderer.h
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-01-13 17:21:49 -0800
committerRomain Guy <romainguy@google.com>2011-01-13 17:22:58 -0800
commitffac7fc5042296a459d0f5a450dbfe20917093dc (patch)
tree27a86c15331cd38d7d072e1c2b7bf8829cceeb90 /libs/hwui/DisplayListRenderer.h
parent462433ae94ff33f9591d910b662e63b821549cad (diff)
downloadframeworks_base-ffac7fc5042296a459d0f5a450dbfe20917093dc.zip
frameworks_base-ffac7fc5042296a459d0f5a450dbfe20917093dc.tar.gz
frameworks_base-ffac7fc5042296a459d0f5a450dbfe20917093dc.tar.bz2
Add debug logs for display lists.
Change-Id: I7bae8fd96e9eccb51f29f73e4069b4d3e6bdbdd7
Diffstat (limited to 'libs/hwui/DisplayListRenderer.h')
-rw-r--r--libs/hwui/DisplayListRenderer.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h
index 0822725..cc52309 100644
--- a/libs/hwui/DisplayListRenderer.h
+++ b/libs/hwui/DisplayListRenderer.h
@@ -39,6 +39,13 @@ namespace uirenderer {
#define MIN_WRITER_SIZE 16384
#define HEAP_BLOCK_SIZE 4096
+// Debug
+#if DEBUG_DISPLAY_LIST
+ #define DISPLAY_LIST_LOGD(...) LOGD(__VA_ARGS__)
+#else
+ #define DISPLAY_LIST_LOGD(...)
+#endif
+
///////////////////////////////////////////////////////////////////////////////
// Helpers
///////////////////////////////////////////////////////////////////////////////
@@ -78,8 +85,10 @@ public:
DisplayList(const DisplayListRenderer& recorder);
~DisplayList();
+ // IMPORTANT: Update the intialization of OP_NAMES in the .cpp file
+ // when modifying this file
enum Op {
- AcquireContext,
+ AcquireContext = 0,
ReleaseContext,
Save,
Restore,
@@ -108,12 +117,14 @@ public:
ResetColorFilter,
SetupColorFilter,
ResetShadow,
- SetupShadow
+ SetupShadow,
};
+ static const char* OP_NAMES[];
+
void initFromDisplayListRenderer(const DisplayListRenderer& recorder);
- void replay(OpenGLRenderer& renderer);
+ void replay(OpenGLRenderer& renderer, uint32_t level = 0);
private:
void init();
@@ -245,7 +256,7 @@ public:
bool clipRect(float left, float top, float right, float bottom, SkRegion::Op op);
- void drawDisplayList(DisplayList* displayList);
+ void drawDisplayList(DisplayList* displayList, uint32_t level = 0);
void drawLayer(Layer* layer, float x, float y, SkPaint* paint);
void drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint);
void drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint);