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

Unified Diff: src/core/SkCanvas.cpp

Issue 1240753003: Revert[2] of guard to remove DrawBitmapRectFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 | « samplecode/SampleTextureDomain.cpp ('k') | src/effects/SkTestImageFilters.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 403a12d6a255cded89ee14f78306a29d01ac56ff..570435869b498dbed2bfc7d557084afe66bf2db4 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1853,6 +1853,12 @@ void SkCanvas::drawImageRect(const SkImage* image, const SkRect* src, const SkRe
this->onDrawImageRect(image, src, dst, paint SRC_RECT_CONSTRAINT_ARG(constraint));
}
+void SkCanvas::drawImageRect(const SkImage* image, const SkIRect& isrc, const SkRect& dst,
+ const SkPaint* paint, SrcRectConstraint constraint) {
+ SkRect src = SkRect::Make(isrc);
+ this->drawImageRect(image, &src, dst, paint, constraint);
+}
+
void SkCanvas::drawImageNine(const SkImage* image, const SkIRect& center, const SkRect& dst,
const SkPaint* paint) {
if (dst.isEmpty()) {
@@ -1871,6 +1877,7 @@ void SkCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar dx, SkScalar dy, cons
this->onDrawBitmap(bitmap, dx, dy, paint);
}
+#ifdef SK_SUPPORT_LEGACY_DRAWBITMAPRECTFLAGS_TYPE
void SkCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst,
const SkPaint* paint, DrawBitmapRectFlags flags) {
if (bitmap.drawsNothing() || dst.isEmpty()) {
@@ -1878,6 +1885,7 @@ void SkCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, c
}
this->onDrawBitmapRect(bitmap, src, dst, paint, (SK_VIRTUAL_CONSTRAINT_TYPE)flags);
}
+#endif
void SkCanvas::drawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst,
const SkPaint* paint, SrcRectConstraint constraint) {
@@ -1887,6 +1895,12 @@ void SkCanvas::drawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const S
this->onDrawBitmapRect(bitmap, src, dst, paint, (SK_VIRTUAL_CONSTRAINT_TYPE)constraint);
}
+void SkCanvas::drawBitmapRect(const SkBitmap& bitmap, const SkIRect& isrc, const SkRect& dst,
+ const SkPaint* paint, SrcRectConstraint constraint) {
+ SkRect src = SkRect::Make(isrc);
+ this->drawBitmapRect(bitmap, &src, dst, paint, constraint);
+}
+
void SkCanvas::drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, const SkRect& dst,
const SkPaint* paint) {
if (bitmap.drawsNothing() || dst.isEmpty()) {
« no previous file with comments | « samplecode/SampleTextureDomain.cpp ('k') | src/effects/SkTestImageFilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698