Merge "Add more debug info for profiling." into honeycomb
This commit is contained in:
@@ -23,10 +23,11 @@
|
|||||||
namespace android {
|
namespace android {
|
||||||
namespace uirenderer {
|
namespace uirenderer {
|
||||||
|
|
||||||
void OpenGLDebugRenderer::prepare(bool opaque) {
|
void OpenGLDebugRenderer::prepareDirty(float left, float top,
|
||||||
|
float right, float bottom, bool opaque) {
|
||||||
mPrimitivesCount = 0;
|
mPrimitivesCount = 0;
|
||||||
LOGD("========= Frame start =========");
|
LOGD("========= Frame start =========");
|
||||||
OpenGLRenderer::prepare(opaque);
|
OpenGLRenderer::prepareDirty(left, top, right, bottom, opaque);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenGLDebugRenderer::finish() {
|
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);
|
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) {
|
void OpenGLDebugRenderer::drawPath(SkPath* path, SkPaint* paint) {
|
||||||
mPrimitivesCount++;
|
mPrimitivesCount++;
|
||||||
StopWatch w("drawPath");
|
StopWatch w("drawPath");
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public:
|
|||||||
~OpenGLDebugRenderer() {
|
~OpenGLDebugRenderer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void prepare(bool opaque);
|
void prepareDirty(float left, float top, float right, float bottom, bool opaque);
|
||||||
void finish();
|
void finish();
|
||||||
|
|
||||||
int saveLayer(float left, float top, float right, float bottom,
|
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);
|
float left, float top, float right, float bottom, SkPaint* paint);
|
||||||
void drawColor(int color, SkXfermode::Mode mode);
|
void drawColor(int color, SkXfermode::Mode mode);
|
||||||
void drawRect(float left, float top, float right, float bottom, SkPaint* paint);
|
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 drawPath(SkPath* path, SkPaint* paint);
|
||||||
void drawLines(float* points, int count, SkPaint* paint);
|
void drawLines(float* points, int count, SkPaint* paint);
|
||||||
void drawText(const char* text, int bytesCount, int count, float x, float y,
|
void drawText(const char* text, int bytesCount, int count, float x, float y,
|
||||||
|
|||||||
Reference in New Issue
Block a user