summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-01-27 18:34:41 -0800
committerRomain Guy <romainguy@google.com>2011-01-27 18:34:41 -0800
commit885153e2d08aadd6333c48c4e98bade637eadc17 (patch)
treebbdf0fc29dcde1fab00c4f0325f55e575e6868a9 /libs
parent270cbcc16a72f982d84afeb5e3fd3f166936394a (diff)
downloadframeworks_base-885153e2d08aadd6333c48c4e98bade637eadc17.zip
frameworks_base-885153e2d08aadd6333c48c4e98bade637eadc17.tar.gz
frameworks_base-885153e2d08aadd6333c48c4e98bade637eadc17.tar.bz2
Add more debug info for profiling.
Change-Id: I0c74e2aa108142cc6ddac4577ae2d0fe6c0ddb25
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/OpenGLDebugRenderer.cpp32
-rw-r--r--libs/hwui/OpenGLDebugRenderer.h8
2 files changed, 37 insertions, 3 deletions
diff --git a/libs/hwui/OpenGLDebugRenderer.cpp b/libs/hwui/OpenGLDebugRenderer.cpp
index 58d6c26..05870bb 100644
--- a/libs/hwui/OpenGLDebugRenderer.cpp
+++ b/libs/hwui/OpenGLDebugRenderer.cpp
@@ -23,10 +23,11 @@
namespace android {
namespace uirenderer {
-void OpenGLDebugRenderer::prepare(bool opaque) {
+void OpenGLDebugRenderer::prepareDirty(float left, float top,
+ float right, float bottom, bool opaque) {
mPrimitivesCount = 0;
LOGD("========= Frame start =========");
- OpenGLRenderer::prepare(opaque);
+ OpenGLRenderer::prepareDirty(left, top, right, bottom, opaque);
}
void OpenGLDebugRenderer::finish() {
@@ -105,6 +106,33 @@ void OpenGLDebugRenderer::drawRect(float left, float top, float right, float bot
OpenGLRenderer::drawRect(left, top, right, bottom, paint);
}
+void OpenGLDebugRenderer::drawRoundRect(float left, float top, float right, float bottom,
+ float rx, float ry, SkPaint* paint) {
+ mPrimitivesCount++;
+ StopWatch w("drawRoundRect");
+ OpenGLRenderer::drawRoundRect(left, top, right, bottom, rx, ry, paint);
+}
+
+void OpenGLDebugRenderer::drawCircle(float x, float y, float radius, SkPaint* paint) {
+ mPrimitivesCount++;
+ StopWatch w("drawCircle");
+ OpenGLRenderer::drawCircle(x, y, radius, paint);
+}
+
+void OpenGLDebugRenderer::drawOval(float left, float top, float right, float bottom,
+ SkPaint* paint) {
+ mPrimitivesCount++;
+ StopWatch w("drawOval");
+ OpenGLRenderer::drawOval(left, top, right, bottom, paint);
+}
+
+void OpenGLDebugRenderer::drawArc(float left, float top, float right, float bottom,
+ float startAngle, float sweepAngle, bool useCenter, SkPaint* paint) {
+ mPrimitivesCount++;
+ StopWatch w("drawArc");
+ OpenGLRenderer::drawArc(left, top, right, bottom, startAngle, sweepAngle, useCenter, paint);
+}
+
void OpenGLDebugRenderer::drawPath(SkPath* path, SkPaint* paint) {
mPrimitivesCount++;
StopWatch w("drawPath");
diff --git a/libs/hwui/OpenGLDebugRenderer.h b/libs/hwui/OpenGLDebugRenderer.h
index 76e6a2e..1a18a67 100644
--- a/libs/hwui/OpenGLDebugRenderer.h
+++ b/libs/hwui/OpenGLDebugRenderer.h
@@ -34,7 +34,7 @@ public:
~OpenGLDebugRenderer() {
}
- void prepare(bool opaque);
+ void prepareDirty(float left, float top, float right, float bottom, bool opaque);
void finish();
int saveLayer(float left, float top, float right, float bottom,
@@ -52,6 +52,12 @@ public:
float left, float top, float right, float bottom, SkPaint* paint);
void drawColor(int color, SkXfermode::Mode mode);
void drawRect(float left, float top, float right, float bottom, SkPaint* paint);
+ void drawRoundRect(float left, float top, float right, float bottom,
+ float rx, float ry, SkPaint* paint);
+ void drawCircle(float x, float y, float radius, SkPaint* paint);
+ void drawOval(float left, float top, float right, float bottom, SkPaint* paint);
+ void drawArc(float left, float top, float right, float bottom,
+ float startAngle, float sweepAngle, bool useCenter, SkPaint* paint);
void drawPath(SkPath* path, SkPaint* paint);
void drawLines(float* points, int count, SkPaint* paint);
void drawText(const char* text, int bytesCount, int count, float x, float y,