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

Unified Diff: gm/image.cpp

Issue 1829303002: move setshader to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: addressing comments from #8 Created 4 years, 9 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/discard.cpp ('k') | gm/imagefiltersclipped.cpp » ('j') | no next file with comments »
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 8cc3023edfe5d86cabad573b2895559c92284030..c86be079d95727e879d1e04a3409017f1e6ba761 100644
--- a/gm/image.cpp
+++ b/gm/image.cpp
@@ -76,8 +76,8 @@ static void test_surface(SkCanvas* canvas, SkSurface* surf, bool usePaint) {
// paint.setFilterBitmap(true);
// paint.setAlpha(0x80);
- canvas->drawImage(imgR.get(), 0, 0, usePaint ? &paint : nullptr);
- canvas->drawImage(imgG.get(), 0, 80, usePaint ? &paint : nullptr);
+ canvas->drawImage(imgR, 0, 0, usePaint ? &paint : nullptr);
+ canvas->drawImage(imgG, 0, 80, usePaint ? &paint : nullptr);
surf->draw(canvas, 0, 160, usePaint ? &paint : nullptr);
SkRect src1, src2, src3;
@@ -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.get(), src1, dst1, usePaint ? &paint : nullptr);
- canvas->drawImageRect(imgG.get(), src2, dst2, usePaint ? &paint : nullptr);
- canvas->drawImageRect(imgR.get(), src3, dst3, usePaint ? &paint : nullptr);
- canvas->drawImageRect(imgG.get(), dst4, usePaint ? &paint : nullptr);
+ canvas->drawImageRect(imgR, src1, dst1, usePaint ? &paint : nullptr);
+ canvas->drawImageRect(imgG, src2, dst2, usePaint ? &paint : nullptr);
+ canvas->drawImageRect(imgR, src3, dst3, usePaint ? &paint : nullptr);
+ canvas->drawImageRect(imgG, dst4, usePaint ? &paint : nullptr);
}
class ImageGM : public skiagm::GM {
« no previous file with comments | « gm/discard.cpp ('k') | gm/imagefiltersclipped.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698