remove unneeded _DRAWIMAGERECT flags

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1281123002
This commit is contained in:
reed 2015-08-07 19:09:09 -07:00 committed by Commit bot
parent 7375d6bab2
commit 41838a0194
2 changed files with 0 additions and 54 deletions

View File

@ -37,9 +37,6 @@ class SkSurface;
class SkSurface_Base;
class SkTextBlob;
//#define SK_SUPPORT_LEGACY_SIMPLE_DRAWIMAGERECT
//#define SK_SUPPORT_LEGACY_SRCPTR_DRAWIMAGERECT
/** \class SkCanvas
A Canvas encapsulates all of the state about drawing into a device (bitmap).
@ -829,21 +826,8 @@ public:
void drawImageRect(const SkImage* image, const SkIRect& isrc, const SkRect& dst,
const SkPaint* paint, SrcRectConstraint = kStrict_SrcRectConstraint);
// variant that assumes src == image-bounds
#ifdef SK_SUPPORT_LEGACY_SIMPLE_DRAWIMAGERECT
void drawImageRect(const SkImage* image, const SkRect& dst, const SkPaint* paint = NULL);
#else
void drawImageRect(const SkImage* image, const SkRect& dst, const SkPaint* paint,
SrcRectConstraint = kStrict_SrcRectConstraint);
#endif
#ifdef SK_SUPPORT_LEGACY_SRCPTR_DRAWIMAGERECT
void drawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst,
const SkPaint* paint, SrcRectConstraint = kStrict_SrcRectConstraint);
void drawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst) {
this->drawImageRect(image, src, dst, NULL, kStrict_SrcRectConstraint);
}
#endif
/**
* Draw the image stretched differentially to fit into dst.
@ -897,17 +881,8 @@ public:
// variant where src is SkIRect
void drawBitmapRect(const SkBitmap& bitmap, const SkIRect& isrc, const SkRect& dst,
const SkPaint* paint, SrcRectConstraint = kStrict_SrcRectConstraint);
#ifdef SK_SUPPORT_LEGACY_SIMPLE_DRAWIMAGERECT
void drawBitmapRect(const SkBitmap& bitmap, const SkRect& dst, const SkPaint* paint = NULL);
#else
void drawBitmapRect(const SkBitmap& bitmap, const SkRect& dst, const SkPaint* paint,
SrcRectConstraint = kStrict_SrcRectConstraint);
#endif
#ifdef SK_SUPPORT_LEGACY_SRCPTR_DRAWIMAGERECT
void drawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst,
const SkPaint* paint, SrcRectConstraint = kStrict_SrcRectConstraint);
#endif
/**
* Draw the bitmap stretched differentially to fit into dst.

View File

@ -1846,23 +1846,6 @@ void SkCanvas::drawImage(const SkImage* image, SkScalar x, SkScalar y, const SkP
this->onDrawImage(image, x, y, paint);
}
#ifdef SK_SUPPORT_LEGACY_SRCPTR_DRAWIMAGERECT
void SkCanvas::drawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst,
const SkPaint* paint, SrcRectConstraint constraint) {
if (dst.isEmpty()) {
return;
}
this->onDrawImageRect(image, src, dst, paint, constraint);
}
void SkCanvas::drawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst,
const SkPaint* paint, SrcRectConstraint constraint) {
if (bitmap.drawsNothing() || dst.isEmpty()) {
return;
}
this->onDrawBitmapRect(bitmap, src, dst, paint, constraint);
}
#endif
void SkCanvas::drawImageRect(const SkImage* image, const SkRect& src, const SkRect& dst,
const SkPaint* paint, SrcRectConstraint constraint) {
if (dst.isEmpty() || src.isEmpty()) {
@ -1876,17 +1859,11 @@ void SkCanvas::drawImageRect(const SkImage* image, const SkIRect& isrc, const Sk
this->drawImageRect(image, SkRect::Make(isrc), dst, paint, constraint);
}
#ifdef SK_SUPPORT_LEGACY_SIMPLE_DRAWIMAGERECT
void SkCanvas::drawImageRect(const SkImage* image, const SkRect& dst, const SkPaint* paint) {
this->drawImageRect(image, SkRect::MakeIWH(image->width(), image->height()), dst, paint);
}
#else
void SkCanvas::drawImageRect(const SkImage* image, const SkRect& dst, const SkPaint* paint,
SrcRectConstraint constraint) {
this->drawImageRect(image, SkRect::MakeIWH(image->width(), image->height()), dst, paint,
constraint);
}
#endif
void SkCanvas::drawImageNine(const SkImage* image, const SkIRect& center, const SkRect& dst,
const SkPaint* paint) {
@ -1919,17 +1896,11 @@ void SkCanvas::drawBitmapRect(const SkBitmap& bitmap, const SkIRect& isrc, const
this->drawBitmapRect(bitmap, SkRect::Make(isrc), dst, paint, constraint);
}
#ifdef SK_SUPPORT_LEGACY_SIMPLE_DRAWIMAGERECT
void SkCanvas::drawBitmapRect(const SkBitmap& bitmap, const SkRect& dst, const SkPaint* paint) {
this->drawBitmapRect(bitmap, SkRect::MakeIWH(bitmap.width(), bitmap.height()), dst, paint);
}
#else
void SkCanvas::drawBitmapRect(const SkBitmap& bitmap, const SkRect& dst, const SkPaint* paint,
SrcRectConstraint constraint) {
this->drawBitmapRect(bitmap, SkRect::MakeIWH(bitmap.width(), bitmap.height()), dst, paint,
constraint);
}
#endif
void SkCanvas::drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, const SkRect& dst,
const SkPaint* paint) {