Index: cc/paint/paint_canvas.h |
diff --git a/cc/paint/paint_canvas.h b/cc/paint/paint_canvas.h |
index cae112e57e9951ea7f468c5c79f9a02e24e85f2c..35c7173e43d2e913415fcc73cb051ad8d936b1b7 100644 |
--- a/cc/paint/paint_canvas.h |
+++ b/cc/paint/paint_canvas.h |
@@ -53,10 +53,8 @@ class CC_PAINT_EXPORT PaintCanvas { |
virtual void translate(SkScalar dx, SkScalar dy) = 0; |
virtual void scale(SkScalar sx, SkScalar sy) = 0; |
virtual void rotate(SkScalar degrees) = 0; |
- virtual void rotate(SkScalar degrees, SkScalar px, SkScalar py) = 0; |
virtual void concat(const SkMatrix& matrix) = 0; |
virtual void setMatrix(const SkMatrix& matrix) = 0; |
- virtual void resetMatrix() = 0; |
virtual void clipRect(const SkRect& rect, |
SkClipOp op, |
@@ -126,18 +124,11 @@ class CC_PAINT_EXPORT PaintCanvas { |
SkScalar ry, |
const PaintFlags& flags) = 0; |
virtual void drawPath(const SkPath& path, const PaintFlags& flags) = 0; |
- virtual void drawImage(const SkImage* image, |
+ virtual void drawImage(sk_sp<const SkImage> image, |
SkScalar left, |
SkScalar top, |
const PaintFlags* flags) = 0; |
- void drawImage(const SkImage* image, SkScalar left, SkScalar top) { |
- drawImage(image, left, top, nullptr); |
- } |
- virtual void drawImage(const sk_sp<SkImage>& image, |
- SkScalar left, |
- SkScalar top, |
- const PaintFlags* flags) = 0; |
- void drawImage(const sk_sp<SkImage>& image, SkScalar left, SkScalar top) { |
+ void drawImage(sk_sp<const SkImage> image, SkScalar left, SkScalar top) { |
drawImage(image, left, top, nullptr); |
} |
@@ -146,7 +137,7 @@ class CC_PAINT_EXPORT PaintCanvas { |
kFast_SrcRectConstraint = SkCanvas::kFast_SrcRectConstraint, |
}; |
- virtual void drawImageRect(const SkImage* image, |
+ virtual void drawImageRect(sk_sp<const SkImage> image, |
const SkRect& src, |
const SkRect& dst, |
const PaintFlags* flags, |
@@ -168,20 +159,17 @@ class CC_PAINT_EXPORT PaintCanvas { |
size_t byte_length, |
const SkPoint pos[], |
const PaintFlags& flags) = 0; |
- virtual void drawTextBlob(const SkTextBlob* blob, |
- SkScalar x, |
- SkScalar y, |
- const PaintFlags& flags) = 0; |
- virtual void drawTextBlob(const sk_sp<SkTextBlob>& blob, |
+ virtual void drawTextBlob(sk_sp<SkTextBlob> blob, |
SkScalar x, |
SkScalar y, |
const PaintFlags& flags) = 0; |
- virtual void drawPicture(const PaintRecord* record) = 0; |
- virtual void drawPicture(const PaintRecord* record, |
+ virtual void drawPicture(sk_sp<const PaintRecord> record, |
const SkMatrix* matrix, |
const PaintFlags* flags) = 0; |
- virtual void drawPicture(sk_sp<PaintRecord> record) = 0; |
+ void drawPicture(sk_sp<const PaintRecord> record) { |
+ drawPicture(record, nullptr, nullptr); |
+ } |
virtual bool isClipEmpty() const = 0; |
virtual bool isClipRect() const = 0; |