Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / include / core / SkImage.h
index 5a6c966..4e01634 100644 (file)
@@ -92,17 +92,6 @@ public:
     SkData* encode(SkImageEncoder::Type t = SkImageEncoder::kPNG_Type,
                    int quality = 80) 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;
-
 protected:
     SkImage(int width, int height) :
         fWidth(width),
@@ -122,6 +111,19 @@ private:
 
     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;
+
     /**
      *  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