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

Unified Diff: gm/bitmaprect.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 | « bench/GameBench.cpp ('k') | gm/drawbitmaprect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/bitmaprect.cpp
diff --git a/gm/bitmaprect.cpp b/gm/bitmaprect.cpp
index ff52c15e5d9963cf570ced85c7c0a284c2b8c0ef..8c7ba9bd5794179c53f97a8d91e225f83f9d94dd 100644
--- a/gm/bitmaprect.cpp
+++ b/gm/bitmaprect.cpp
@@ -73,7 +73,7 @@ protected:
canvas->drawBitmapRect(bitmap, &srcR, dstR, &paint,
SkCanvas::kStrict_SrcRectConstraint);
} else {
- canvas->drawBitmapRect(bitmap, &src[i], dstR, &paint);
+ canvas->drawBitmapRect(bitmap, src[i], dstR, &paint);
}
canvas->drawRect(dstR, paint);
@@ -143,7 +143,7 @@ protected:
SkRect srcR = { 0.5f, 0.5f, 2.5f, 2.5f };
SkRect dstR = { 100, 100, 300, 200 };
- canvas->drawBitmapRectToRect(bitmap, &srcR, dstR, NULL);
+ canvas->drawBitmapRect(bitmap, &srcR, dstR, NULL, SkCanvas::kStrict_SrcRectConstraint);
}
private:
@@ -213,16 +213,13 @@ protected:
SkRect dstR2 = { 10, 410, 30, 430 };
if (!fUseIRect) {
- canvas->drawBitmapRectToRect(fBigBitmap, &srcR1, dstR1, &paint);
- canvas->drawBitmapRectToRect(fBigBitmap, &srcR2, dstR2, &paint);
+ canvas->drawBitmapRect(fBigBitmap, &srcR1, dstR1, &paint,
+ SkCanvas::kStrict_SrcRectConstraint);
+ canvas->drawBitmapRect(fBigBitmap, &srcR2, dstR2, &paint,
+ SkCanvas::kStrict_SrcRectConstraint);
} else {
- SkIRect iSrcR1, iSrcR2;
-
- srcR1.roundOut(&iSrcR1);
- srcR2.roundOut(&iSrcR2);
-
- canvas->drawBitmapRect(fBigBitmap, &iSrcR1, dstR1, &paint);
- canvas->drawBitmapRect(fBigBitmap, &iSrcR2, dstR2, &paint);
+ canvas->drawBitmapRect(fBigBitmap, srcR1.roundOut(), dstR1, &paint);
+ canvas->drawBitmapRect(fBigBitmap, srcR2.roundOut(), dstR2, &paint);
}
}
« no previous file with comments | « bench/GameBench.cpp ('k') | gm/drawbitmaprect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698