Index: src/gpu/SkGpuDevice.cpp |
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp |
index cd678af880a723992c79cd12a1dabe05ce9da5de..7c77dedecb21a18690de67e6632cbf898136bb1e 100644 |
--- a/src/gpu/SkGpuDevice.cpp |
+++ b/src/gpu/SkGpuDevice.cpp |
@@ -308,7 +308,7 @@ GrRenderTarget* SkGpuDevice::accessRenderTarget() { |
void SkGpuDevice::clearAll() { |
GrColor color = 0; |
- GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::clearAll", fContext); |
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "clearAll", fContext); |
SkIRect rect = SkIRect::MakeWH(this->width(), this->height()); |
fDrawContext->clear(&rect, color, true); |
fNeedClear = false; |
@@ -355,7 +355,7 @@ void SkGpuDevice::replaceRenderTarget(bool shouldRetainContent) { |
void SkGpuDevice::drawPaint(const SkDraw& draw, const SkPaint& paint) { |
CHECK_SHOULD_DRAW(draw); |
- GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawPaint", fContext); |
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawPaint", fContext); |
GrPaint grPaint; |
if (!SkPaintToGrPaint(this->context(), paint, *draw.fMatrix, &grPaint)) { |
@@ -446,7 +446,7 @@ void SkGpuDevice::drawPoints(const SkDraw& draw, SkCanvas::PointMode mode, |
/////////////////////////////////////////////////////////////////////////////// |
void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect, const SkPaint& paint) { |
- GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawRect", fContext); |
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawRect", fContext); |
CHECK_FOR_ANNOTATION(paint); |
CHECK_SHOULD_DRAW(draw); |
@@ -492,7 +492,7 @@ void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect, const SkPaint |
void SkGpuDevice::drawRRect(const SkDraw& draw, const SkRRect& rect, |
const SkPaint& paint) { |
- GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawRRect", fContext); |
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawRRect", fContext); |
CHECK_FOR_ANNOTATION(paint); |
CHECK_SHOULD_DRAW(draw); |
@@ -555,7 +555,7 @@ void SkGpuDevice::drawRRect(const SkDraw& draw, const SkRRect& rect, |
void SkGpuDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer, |
const SkRRect& inner, const SkPaint& paint) { |
- GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawDRRect", fContext); |
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawDRRect", fContext); |
CHECK_FOR_ANNOTATION(paint); |
CHECK_SHOULD_DRAW(draw); |
@@ -587,7 +587,7 @@ void SkGpuDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer, |
///////////////////////////////////////////////////////////////////////////// |
void SkGpuDevice::drawOval(const SkDraw& draw, const SkRect& oval, const SkPaint& paint) { |
- GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawOval", fContext); |
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawOval", fContext); |
CHECK_FOR_ANNOTATION(paint); |
CHECK_SHOULD_DRAW(draw); |
@@ -651,7 +651,7 @@ void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath, |
CHECK_FOR_ANNOTATION(paint); |
CHECK_SHOULD_DRAW(draw); |
- GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawPath", fContext); |
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawPath", fContext); |
GrBlurUtils::drawPathWithMaskFilter(fContext, fDrawContext, |
fClip, origSrcPath, paint, |
@@ -1287,7 +1287,7 @@ void SkGpuDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap, |
void SkGpuDevice::drawDevice(const SkDraw& draw, SkBaseDevice* device, |
int x, int y, const SkPaint& paint) { |
// clear of the source device must occur before CHECK_SHOULD_DRAW |
- GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawDevice", fContext); |
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawDevice", fContext); |
SkGpuDevice* dev = static_cast<SkGpuDevice*>(device); |
// TODO: If the source device covers the whole of this device, we could |
@@ -1452,7 +1452,7 @@ void SkGpuDevice::drawImageRect(const SkDraw& draw, const SkImage* image, const |
void SkGpuDevice::drawProducerNine(const SkDraw& draw, GrTextureProducer* producer, |
const SkIRect& center, const SkRect& dst, const SkPaint& paint) { |
- GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawProducerNine", fContext); |
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawProducerNine", fContext); |
CHECK_FOR_ANNOTATION(paint); |
CHECK_SHOULD_DRAW(draw); |
@@ -1533,7 +1533,7 @@ void SkGpuDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode, |
const uint16_t indices[], int indexCount, |
const SkPaint& paint) { |
CHECK_SHOULD_DRAW(draw); |
- GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawVertices", fContext); |
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawVertices", fContext); |
// If both textures and vertex-colors are nullptr, strokes hairlines with the paint's color. |
if ((nullptr == texs || nullptr == paint.getShader()) && nullptr == colors) { |
@@ -1665,7 +1665,7 @@ void SkGpuDevice::drawAtlas(const SkDraw& draw, const SkImage* atlas, const SkRS |
} |
CHECK_SHOULD_DRAW(draw); |
- GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawText", fContext); |
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawText", fContext); |
SkPaint p(paint); |
p.setShader(atlas->newShader(SkShader::kClamp_TileMode, SkShader::kClamp_TileMode))->unref(); |
@@ -1692,7 +1692,7 @@ void SkGpuDevice::drawText(const SkDraw& draw, const void* text, |
size_t byteLength, SkScalar x, SkScalar y, |
const SkPaint& paint) { |
CHECK_SHOULD_DRAW(draw); |
- GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawText", fContext); |
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawText", fContext); |
GrPaint grPaint; |
if (!SkPaintToGrPaint(this->context(), paint, *draw.fMatrix, &grPaint)) { |
@@ -1708,7 +1708,7 @@ void SkGpuDevice::drawText(const SkDraw& draw, const void* text, |
void SkGpuDevice::drawPosText(const SkDraw& draw, const void* text, size_t byteLength, |
const SkScalar pos[], int scalarsPerPos, |
const SkPoint& offset, const SkPaint& paint) { |
- GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawPosText", fContext); |
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawPosText", fContext); |
CHECK_SHOULD_DRAW(draw); |
GrPaint grPaint; |
@@ -1725,7 +1725,7 @@ void SkGpuDevice::drawPosText(const SkDraw& draw, const void* text, size_t byteL |
void SkGpuDevice::drawTextBlob(const SkDraw& draw, const SkTextBlob* blob, SkScalar x, SkScalar y, |
const SkPaint& paint, SkDrawFilter* drawFilter) { |
- GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawTextBlob", fContext); |
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawTextBlob", fContext); |
CHECK_SHOULD_DRAW(draw); |
SkDEBUGCODE(this->validate();) |
@@ -1743,6 +1743,12 @@ bool SkGpuDevice::onShouldDisableLCD(const SkPaint& paint) const { |
void SkGpuDevice::flush() { |
DO_DEFERRED_CLEAR(); |
fRenderTarget->prepareForExternalIO(); |
+ |
+ // Clear batch debugging output |
+ if (GR_BATCH_DEBUGGING_OUTPUT) { |
+ SkDebugf("%s\n", fContext->getAuditTrail()->toJson().c_str()); |
+ GR_AUDIT_TRAIL_RESET(fContext->getAuditTrail()); |
+ } |
} |
/////////////////////////////////////////////////////////////////////////////// |