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

Unified Diff: gm/bitmaprect.cpp

Issue 1272713005: flag to use const& instead of const* for src-rect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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
Index: gm/bitmaprect.cpp
diff --git a/gm/bitmaprect.cpp b/gm/bitmaprect.cpp
index bde6a6f10a07548d9197298b5939b513be14d037..cfceab5af945e55710fb36c4fc1da9c6bae55ba2 100644
--- a/gm/bitmaprect.cpp
+++ b/gm/bitmaprect.cpp
@@ -70,7 +70,7 @@ protected:
canvas->drawBitmap(bitmap, 0, 0, &paint);
if (!fUseIRect) {
- canvas->drawBitmapRect(bitmap, &srcR, dstR, &paint,
+ canvas->drawBitmapRect(bitmap, srcR, dstR, &paint,
SkCanvas::kStrict_SrcRectConstraint);
} else {
canvas->drawBitmapRect(bitmap, src[i], dstR, &paint);
@@ -143,7 +143,7 @@ protected:
SkRect srcR = { 0.5f, 0.5f, 2.5f, 2.5f };
SkRect dstR = { 100, 100, 300, 200 };
- canvas->drawBitmapRect(bitmap, &srcR, dstR, NULL, SkCanvas::kStrict_SrcRectConstraint);
+ canvas->drawBitmapRect(bitmap, srcR, dstR, nullptr, SkCanvas::kStrict_SrcRectConstraint);
}
private:
@@ -213,9 +213,9 @@ protected:
SkRect dstR2 = { 10, 410, 30, 430 };
if (!fUseIRect) {
- canvas->drawBitmapRect(fBigBitmap, &srcR1, dstR1, &paint,
+ canvas->drawBitmapRect(fBigBitmap, srcR1, dstR1, &paint,
SkCanvas::kStrict_SrcRectConstraint);
- canvas->drawBitmapRect(fBigBitmap, &srcR2, dstR2, &paint,
+ canvas->drawBitmapRect(fBigBitmap, srcR2, dstR2, &paint,
SkCanvas::kStrict_SrcRectConstraint);
} else {
canvas->drawBitmapRect(fBigBitmap, srcR1.roundOut(), dstR1, &paint);
@@ -263,7 +263,7 @@ protected:
// the drawRect shows the same problem as clipRect(r) followed by drawcolor(red)
canvas->drawRect(r, paint);
- canvas->drawBitmapRect(fBM, NULL, r, NULL);
+ canvas->drawBitmapRect(fBM, r, nullptr);
}
private:
« no previous file with comments | « gm/bigtileimagefilter.cpp ('k') | gm/bitmaprecttest.cpp » ('j') | gm/image.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698