Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Unified Diff: Source/platform/graphics/InterceptingCanvas.h

Issue 1183863005: Paint Profiler: unroll SkPictures (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/InterceptingCanvas.h
diff --git a/Source/platform/graphics/InterceptingCanvas.h b/Source/platform/graphics/InterceptingCanvas.h
index 6f575d7c1f4283f983b9c1748475a8513b0d197b..910c01633cb1b8e12e0b3602f492b4868ae595b0 100644
--- a/Source/platform/graphics/InterceptingCanvas.h
+++ b/Source/platform/graphics/InterceptingCanvas.h
@@ -32,6 +32,7 @@
#define InterceptingCanvas_h
#include "third_party/skia/include/core/SkCanvas.h"
+#include "third_party/skia/include/core/SkPicture.h"
#include "wtf/Assertions.h"
#include "wtf/Noncopyable.h"
@@ -67,6 +68,8 @@ protected:
explicit InterceptingCanvasBase(SkBitmap bitmap) : SkCanvas(bitmap), m_callNestingDepth(0), m_callCount(0) { };
InterceptingCanvasBase(int width, int height) : SkCanvas(width, height), m_callNestingDepth(0), m_callCount(0) { };
+ void unrollDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*, SkPicture::AbortCallback*);
+
void onDrawPaint(const SkPaint&) override = 0;
void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override = 0;
void onDrawRect(const SkRect&, const SkPaint&) override = 0;
@@ -256,8 +259,7 @@ protected:
void onDrawPicture(const SkPicture* picture, const SkMatrix* matrix, const SkPaint* paint) override
{
- Interceptor interceptor(this);
- this->SkCanvas::onDrawPicture(picture, matrix, paint);
+ this->unrollDrawPicture(picture, matrix, paint, nullptr);
}
void didSetMatrix(const SkMatrix& matrix) override

Powered by Google App Engine
This is Rietveld 408576698