aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-07-17 07:09:43 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-17 07:09:43 -0700
commit84984efeb64787b88c5f8bd6929cfe2d58a3ba06 (patch)
tree79645557c20ff0e6e6bf75a0e92df1c7fece039f /include
parentb9efc79015599db1b95a304210d119947bedb8de (diff)
Revert[2] of guard to remove DrawBitmapRectFlags
Diffstat (limited to 'include')
-rw-r--r--include/core/SkCanvas.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 05f64dfe33..299ef45d28 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -35,7 +35,7 @@ class SkTextBlob;
class GrContext;
class GrRenderTarget;
-//#define SK_SUPPORT_LEGACY_ONDRAWIMAGERECT
+//#define SK_SUPPORT_LEGACY_DRAWBITMAPRECTFLAGS_TYPE
class SkCanvasState;
@@ -834,11 +834,10 @@ public:
* @param constraint Control the tradeoff between speed and exactness w.r.t. the src-rect.
*/
void drawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst,
- const SkPaint* paint, SrcRectConstraint);
+ const SkPaint* paint, SrcRectConstraint = kStrict_SrcRectConstraint);
- void drawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst,
- const SkPaint* paint = NULL) {
- this->drawImageRect(image, src, dst, paint, kStrict_SrcRectConstraint);
+ void drawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst) {
+ this->drawImageRect(image, src, dst, NULL, kStrict_SrcRectConstraint);
}
void drawImageRect(const SkImage* image, const SkRect& dst, const SkPaint* paint = NULL) {
@@ -846,6 +845,9 @@ public:
this->drawImageRect(image, NULL, dst, paint, kStrict_SrcRectConstraint);
}
+ void drawImageRect(const SkImage* image, const SkIRect& isrc, const SkRect& dst,
+ const SkPaint* paint, SrcRectConstraint = kStrict_SrcRectConstraint);
+
/**
* Draw the image stretched differentially to fit into dst.
* center is a rect within the image, and logically divides the image
@@ -893,13 +895,22 @@ public:
* @param paint The paint used to draw the bitmap, or NULL
* @param constraint Control the tradeoff between speed and exactness w.r.t. the src-rect.
*/
+#ifdef SK_SUPPORT_LEGACY_DRAWBITMAPRECTFLAGS_TYPE
void drawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst,
const SkPaint* paint, SrcRectConstraint);
+#else
+ void drawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst,
+ const SkPaint* paint, SrcRectConstraint = kStrict_SrcRectConstraint);
+#endif
void drawBitmapRect(const SkBitmap& bitmap, const SkRect& dst, const SkPaint* paint = NULL) {
this->drawBitmapRect(bitmap, NULL, dst, paint, kStrict_SrcRectConstraint);
}
+ void drawBitmapRect(const SkBitmap& bitmap, const SkIRect& isrc, const SkRect& dst,
+ const SkPaint* paint, SrcRectConstraint = kStrict_SrcRectConstraint);
+
+#ifdef SK_SUPPORT_LEGACY_DRAWBITMAPRECTFLAGS_TYPE
// IMPORTANT that thse be value-equal with SrcRectConstraint (during transition period)
enum DrawBitmapRectFlags {
kNone_DrawBitmapRectFlag = 0x0,
@@ -934,6 +945,7 @@ public:
}
this->drawBitmapRectToRect(bitmap, realSrcPtr, dst, paint, flags);
}
+#endif
/**
* Draw the bitmap stretched differentially to fit into dst.