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

Unified Diff: include/core/SkImage.h

Issue 598133002: Revert of SkCanvas::drawImage is the new way for drawing an SkImage to a Canvas (Closed) Base URL: https://skia.googlesource.com/skia.git@refactor_skImage
Patch Set: Created 6 years, 3 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
« no previous file with comments | « include/core/SkCanvas.h ('k') | samplecode/SampleTextureDomain.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImage.h
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index c7625f6b4d838eb8bde03348557e3d739fb9b17e..a723aeeb86ea6c9b2783fcd0646b11f781a6f21a 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -71,6 +71,17 @@
SkShader::TileMode,
const SkMatrix* localMatrix = NULL) const;
+ 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 draw(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint*) const;
+
/**
* If the image has direct access to its pixels (i.e. they are in local
* RAM) return the (const) address of those pixels, and if not null, return
@@ -111,19 +122,6 @@
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 draw(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint*) const;
-
/**
* Return a copy of the image's pixels, limiting them to the subset
* rectangle's intersection wit the image bounds. If subset is NULL, then
« no previous file with comments | « include/core/SkCanvas.h ('k') | samplecode/SampleTextureDomain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698