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

Unified Diff: samplecode/SampleTextureDomain.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: samplecode/SampleTextureDomain.cpp
diff --git a/samplecode/SampleTextureDomain.cpp b/samplecode/SampleTextureDomain.cpp
index dad1e0e07a28a521534d79df9b2607fae479e58e..7c770a9aac7801489d473c25f56b0b7189294d45 100644
--- a/samplecode/SampleTextureDomain.cpp
+++ b/samplecode/SampleTextureDomain.cpp
@@ -53,7 +53,7 @@ protected:
// the constrained texture domain.
srcRect.setXYWH(1, 1, 3, 3);
dstRect.setXYWH(5, 5, 305, 305);
- canvas->drawBitmapRect(fBM, &srcRect, dstRect, &paint, SkCanvas::kStrict_SrcRectConstraint);
+ canvas->drawBitmapRect(fBM, srcRect, dstRect, &paint, SkCanvas::kStrict_SrcRectConstraint);
// Test that bitmap draws across separate devices also respect
// the constrainted texture domain.
@@ -64,14 +64,14 @@ protected:
srcRect.setXYWH(1, 1, 3, 3);
dstRect.setXYWH(1, 1, 3, 3);
- surface->getCanvas()->drawBitmapRect(fBM, &srcRect, dstRect, &paint,
+ surface->getCanvas()->drawBitmapRect(fBM, srcRect, dstRect, &paint,
SkCanvas::kStrict_SrcRectConstraint);
SkAutoTUnref<SkImage> image(surface->newImageSnapshot());
srcRect.setXYWH(1, 1, 3, 3);
dstRect.setXYWH(405, 5, 305, 305);
- canvas->drawImageRect(image, &srcRect, dstRect, &paint);
+ canvas->drawImageRect(image, srcRect, dstRect, &paint);
// Test that bitmap blurring using a subrect
// renders correctly
@@ -83,7 +83,7 @@ protected:
SkBlurMaskFilter::kHighQuality_BlurFlag |
SkBlurMaskFilter::kIgnoreTransform_BlurFlag);
paint.setMaskFilter(mf)->unref();
- canvas->drawImageRect(image, &srcRect, dstRect, &paint);
+ canvas->drawImageRect(image, srcRect, dstRect, &paint);
// Blur and a rotation + NULL src rect
// This should not trigger the texture domain code

Powered by Google App Engine
This is Rietveld 408576698