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

Unified Diff: gm/clippedbitmapshaders.cpp

Issue 245963010: Move SkShader::fLocalMatrix into SkShader constructor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 6 years, 8 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/bitmapshader.cpp ('k') | gm/colortype.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/clippedbitmapshaders.cpp
diff --git a/gm/clippedbitmapshaders.cpp b/gm/clippedbitmapshaders.cpp
index 72c04742608c1591e2a02f0dd62c4fd0cb10b36f..ee20847726bb7e17be53644f574fdb8d7fa240ce 100644
--- a/gm/clippedbitmapshaders.cpp
+++ b/gm/clippedbitmapshaders.cpp
@@ -78,15 +78,14 @@ protected:
virtual void onDraw(SkCanvas* canvas) {
SkBitmap bmp = create_bitmap();
- SkShader* shader = SkShader::CreateBitmapShader(
- bmp, fMode, fMode);
-
- SkPaint paint;
SkMatrix s;
s.reset();
s.setScale(8, 8);
s.postTranslate(SLIDE_SIZE / 2, SLIDE_SIZE / 2);
- shader->setLocalMatrix(s);
+ SkShader* shader = SkShader::CreateBitmapShader(
+ bmp, fMode, fMode, &s);
+
+ SkPaint paint;
paint.setShader(shader)->unref();
if (fHQ) {
« no previous file with comments | « gm/bitmapshader.cpp ('k') | gm/colortype.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698