summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-01-27 22:30:57 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-01-27 22:30:57 -0800
commitd0b54a73941aa5541ed1adc48f6739bda132970b (patch)
treea2858e9e47163e739f141c165665d588fc4075d7
parent386ef6da5a95243b4a55b3f760621260e20a5e39 (diff)
parent885153e2d08aadd6333c48c4e98bade637eadc17 (diff)
downloadframeworks_base-d0b54a73941aa5541ed1adc48f6739bda132970b.zip
frameworks_base-d0b54a73941aa5541ed1adc48f6739bda132970b.tar.gz
frameworks_base-d0b54a73941aa5541ed1adc48f6739bda132970b.tar.bz2
Merge "Add more debug info for profiling." into honeycomb
-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,