diff options
author | 2015-05-05 17:30:45 -0700 | |
---|---|---|
committer | 2015-05-05 17:30:45 -0700 | |
commit | 3538e3bfe2e00bc1b5b48d977fa7adff64d8c96b (patch) | |
tree | 215ee85419b07a42e582d46eae24352b4d3a7940 /include/core/SkImage.h | |
parent | d96a67bcb196aa4f73ff773bd45810a94ca872d8 (diff) |
Revert of Make drawImage a virtual on SkDevice (patchset #4 id:60001 of https://codereview.chromium.org/1122643005/)
Reason for revert:
speculative to see if it unblocks DEPS roll
Original issue's description:
> Make drawImage a virtual on SkDevice
>
> Now with patch for SkDeferredCanvas
>
> This reverts commit 119468b71f8f4f45657ab30ead331be665de5a57.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/14fe8fd3e53b5e988aac189a8bc3ed28904d85c8
TBR=robertphillips@google.com,mtklein@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1124003002
Diffstat (limited to 'include/core/SkImage.h')
-rw-r--r-- | include/core/SkImage.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h index ebc9a29394..ec85516619 100644 --- a/include/core/SkImage.h +++ b/include/core/SkImage.h @@ -172,6 +172,19 @@ private: static uint32_t NextUniqueID(); typedef SkRefCnt INHERITED; + + friend class SkCanvas; + + void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const; + + /** + * Draw the image, cropped to the src rect, to the dst rect of a canvas. + * If src is larger than the bounds of the image, the rest of the image is + * filled with transparent black pixels. + * + * See SkCanvas::drawBitmapRectToRect for similar behavior. + */ + void drawRect(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint*) const; }; #endif |