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

Unified Diff: gm/bleed.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
« no previous file with comments | « gm/bitmaprecttest.cpp ('k') | gm/drawbitmaprect.cpp » ('j') | gm/image.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/bleed.cpp
diff --git a/gm/bleed.cpp b/gm/bleed.cpp
index 5bef31dfc1f9c2bdfaeb3209c90b87f82c75bb06..12682c1023dd2b0413c511cd0a271316856736a1 100644
--- a/gm/bleed.cpp
+++ b/gm/bleed.cpp
@@ -17,13 +17,13 @@
#endif
static void draw_bitmap_rect(SkCanvas* canvas, const SkBitmap& bitmap, const SkImage*,
- const SkRect* src, const SkRect& dst,
+ const SkRect& src, const SkRect& dst,
const SkPaint* paint, SkCanvas::SrcRectConstraint constraint) {
canvas->drawBitmapRect(bitmap, src, dst, paint, constraint);
}
static void draw_image_rect(SkCanvas* canvas, const SkBitmap&, const SkImage* image,
- const SkRect* src, const SkRect& dst,
+ const SkRect& src, const SkRect& dst,
const SkPaint* paint, SkCanvas::SrcRectConstraint constraint) {
canvas->drawImageRect(image, src, dst, paint, constraint);
}
@@ -35,7 +35,7 @@ enum BleedTest {
const struct {
const char* fName;
- void (*fDraw)(SkCanvas*, const SkBitmap&, const SkImage*, const SkRect*, const SkRect&,
+ void (*fDraw)(SkCanvas*, const SkBitmap&, const SkImage*, const SkRect&, const SkRect&,
const SkPaint*, SkCanvas::SrcRectConstraint);
} gBleedRec[] = {
{ "bleed", draw_bitmap_rect },
@@ -144,7 +144,7 @@ protected:
SkPaint paint;
paint.setFilterQuality(filter);
- gBleedRec[fBT].fDraw(canvas, fBitmapSmall, fImageSmall, &src, dst, &paint, constraint);
+ gBleedRec[fBT].fDraw(canvas, fBitmapSmall, fImageSmall, src, dst, &paint, constraint);
}
// Draw almost all of the large bitmap
@@ -159,7 +159,7 @@ protected:
SkPaint paint;
paint.setFilterQuality(filter);
- gBleedRec[fBT].fDraw(canvas, fBitmapBig, fImageBig, &src, dst, &paint, constraint);
+ gBleedRec[fBT].fDraw(canvas, fBitmapBig, fImageBig, src, dst, &paint, constraint);
}
// Draw ~1/4 of the large bitmap
@@ -174,7 +174,7 @@ protected:
SkPaint paint;
paint.setFilterQuality(filter);
- gBleedRec[fBT].fDraw(canvas, fBitmapBig, fImageBig, &src, dst, &paint, constraint);
+ gBleedRec[fBT].fDraw(canvas, fBitmapBig, fImageBig, src, dst, &paint, constraint);
}
// Draw the center of the small bitmap with a mask filter
@@ -192,7 +192,7 @@ protected:
SkBlurMask::ConvertRadiusToSigma(3));
paint.setMaskFilter(mf)->unref();
- gBleedRec[fBT].fDraw(canvas, fBitmapSmall, fImageSmall, &src, dst, &paint, constraint);
+ gBleedRec[fBT].fDraw(canvas, fBitmapSmall, fImageSmall, src, dst, &paint, constraint);
}
void onDraw(SkCanvas* canvas) override {
« no previous file with comments | « gm/bitmaprecttest.cpp ('k') | gm/drawbitmaprect.cpp » ('j') | gm/image.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698