Index: include/core/SkCanvas.h |
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h |
index 299ef45d28aa410e190ed29a720b7a12060fbe76..45f5c9cbd344ae1bf31c074038846e63f8ae049d 100644 |
--- a/include/core/SkCanvas.h |
+++ b/include/core/SkCanvas.h |
@@ -35,22 +35,8 @@ class SkTextBlob; |
class GrContext; |
class GrRenderTarget; |
-//#define SK_SUPPORT_LEGACY_DRAWBITMAPRECTFLAGS_TYPE |
- |
class SkCanvasState; |
-#ifdef SK_SUPPORT_LEGACY_ONDRAWIMAGERECT |
- #define SK_VIRTUAL_CONSTRAINT_TYPE SkCanvas::DrawBitmapRectFlags |
- #define SRC_RECT_CONSTRAINT_PARAM(param) |
- #define SRC_RECT_CONSTRAINT_ARG(arg) |
- #define SRC_RECT_CONSTRAINT_LOCAL_DEFAULT(var) SkCanvas::SrcRectConstraint var = SkCanvas::kStrict_SrcRectConstraint; |
-#else |
- #define SK_VIRTUAL_CONSTRAINT_TYPE SkCanvas::SrcRectConstraint |
- #define SRC_RECT_CONSTRAINT_PARAM(param) , SrcRectConstraint param |
- #define SRC_RECT_CONSTRAINT_ARG(arg) , arg |
- #define SRC_RECT_CONSTRAINT_LOCAL_DEFAULT(var) |
-#endif |
- |
/** \class SkCanvas |
A Canvas encapsulates all of the state about drawing into a device (bitmap). |
@@ -895,13 +881,8 @@ 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); |
@@ -910,43 +891,6 @@ public: |
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, |
- /** |
- * When filtering is enabled, allow the color samples outside of |
- * the src rect (but still in the src bitmap) to bleed into the |
- * drawn portion |
- */ |
- kBleed_DrawBitmapRectFlag = 0x1, |
- }; |
- |
- /** Draw the specified bitmap, with the specified matrix applied (before the |
- canvas' matrix is applied). |
- @param bitmap The bitmap to be drawn |
- @param src Optional: specify the subset of the bitmap to be drawn |
- @param dst The destination rectangle where the scaled/translated |
- image will be drawn |
- @param paint The paint used to draw the bitmap, or NULL |
- */ |
- void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst, |
- const SkPaint* paint = NULL, |
- DrawBitmapRectFlags flags = kNone_DrawBitmapRectFlag); |
- |
- void drawBitmapRect(const SkBitmap& bitmap, const SkIRect* isrc, |
- const SkRect& dst, const SkPaint* paint = NULL, |
- DrawBitmapRectFlags flags = kNone_DrawBitmapRectFlag) { |
- SkRect realSrcStorage; |
- SkRect* realSrcPtr = NULL; |
- if (isrc) { |
- realSrcStorage.set(*isrc); |
- realSrcPtr = &realSrcStorage; |
- } |
- this->drawBitmapRectToRect(bitmap, realSrcPtr, dst, paint, flags); |
- } |
-#endif |
- |
/** |
* Draw the bitmap stretched differentially to fit into dst. |
* center is a rect within the bitmap, and logically divides the bitmap |
@@ -1327,14 +1271,14 @@ protected: |
int count, SkXfermode::Mode, const SkRect* cull, const SkPaint*); |
virtual void onDrawPath(const SkPath&, const SkPaint&); |
virtual void onDrawImage(const SkImage*, SkScalar dx, SkScalar dy, const SkPaint*); |
- virtual void onDrawImageRect(const SkImage*, const SkRect*, const SkRect&, const SkPaint* |
- SRC_RECT_CONSTRAINT_PARAM(constraint)); |
+ virtual void onDrawImageRect(const SkImage*, const SkRect*, const SkRect&, const SkPaint*, |
+ SrcRectConstraint); |
virtual void onDrawImageNine(const SkImage*, const SkIRect& center, const SkRect& dst, |
const SkPaint*); |
virtual void onDrawBitmap(const SkBitmap&, SkScalar dx, SkScalar dy, const SkPaint*); |
virtual void onDrawBitmapRect(const SkBitmap&, const SkRect*, const SkRect&, const SkPaint*, |
- SK_VIRTUAL_CONSTRAINT_TYPE); |
+ SrcRectConstraint); |
virtual void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, |
const SkPaint*); |
virtual void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*); |