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

Unified Diff: gm/discard.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/dcshader.cpp ('k') | gm/image.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/discard.cpp
diff --git a/gm/discard.cpp b/gm/discard.cpp
index d75f0ab1418a99389d9ff3cae27a6021ed511dcc..136458170ea75f01f7a933bdde466bf56dcee6d9 100644
--- a/gm/discard.cpp
+++ b/gm/discard.cpp
@@ -7,7 +7,6 @@
#include "gm.h"
#include "SkCanvas.h"
-#include "SkColorShader.h"
#include "SkPaint.h"
#include "SkRandom.h"
#include "SkSurface.h"
@@ -66,9 +65,8 @@ protected:
surface->getCanvas()->clear(color);
break;
case 2:
- SkColorShader shader(color);
SkPaint paint;
- paint.setShader(&shader);
+ paint.setShader(SkShader::MakeColorShader(color));
surface->getCanvas()->drawPaint(paint);
break;
}
« no previous file with comments | « gm/dcshader.cpp ('k') | gm/image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698