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

Unified Diff: gm/image.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/drawbitmaprect.cpp ('k') | gm/mipmap.cpp » ('j') | src/c/sk_surface.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/image.cpp
diff --git a/gm/image.cpp b/gm/image.cpp
index 5e840fbb2f8922b165db0f9364de8ddfe9b96010..205b4ab278fd3284d57dcf6ab33bfcdffca265ae 100644
--- a/gm/image.cpp
+++ b/gm/image.cpp
@@ -92,10 +92,10 @@ static void test_surface(SkCanvas* canvas, SkSurface* surf, bool usePaint) {
dst3.set(0, 400, 65, 465);
dst4.set(0, 480, 65, 545);
- canvas->drawImageRect(imgR, &src1, dst1, usePaint ? &paint : NULL);
- canvas->drawImageRect(imgG, &src2, dst2, usePaint ? &paint : NULL);
- canvas->drawImageRect(imgR, &src3, dst3, usePaint ? &paint : NULL);
- canvas->drawImageRect(imgG, NULL, dst4, usePaint ? &paint : NULL);
+ canvas->drawImageRect(imgR, src1, dst1, usePaint ? &paint : NULL);
+ canvas->drawImageRect(imgG, src2, dst2, usePaint ? &paint : NULL);
+ canvas->drawImageRect(imgR, src3, dst3, usePaint ? &paint : NULL);
+ canvas->drawImageRect(imgG, dst4, usePaint ? &paint : NULL);
imgG->unref();
imgR->unref();
@@ -241,7 +241,7 @@ protected:
if (subset) {
srcR.set(*subset);
}
- canvas->drawImageRect(image, subset ? &srcR : NULL, dstR, &paint);
+ canvas->legacy_drawImageRect(image, subset ? &srcR : NULL, dstR, &paint);
canvas->translate(newW + 20.0f, 0);
// image method
« no previous file with comments | « gm/drawbitmaprect.cpp ('k') | gm/mipmap.cpp » ('j') | src/c/sk_surface.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698