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

Unified Diff: gm/bitmapshader.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/bigmatrix.cpp ('k') | gm/clippedbitmapshaders.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/bitmapshader.cpp
diff --git a/gm/bitmapshader.cpp b/gm/bitmapshader.cpp
index acb2ecb22f32cd227d8620cd4cfad4aaef8f27f2..8085f5c42c701e10c0ae55d596bf1f155972ca5a 100644
--- a/gm/bitmapshader.cpp
+++ b/gm/bitmapshader.cpp
@@ -35,8 +35,7 @@ static void draw_mask(SkBitmap* bm) {
canvas.drawCircle(10, 10, 10, circlePaint);
}
-static void adopt_shader(SkPaint* paint, SkShader* shader, SkMatrix s) {
- shader->setLocalMatrix(s);
+static void adopt_shader(SkPaint* paint, SkShader* shader) {
paint->setShader(shader);
SkSafeUnref(shader);
}
@@ -72,7 +71,7 @@ protected:
canvas->save();
adopt_shader(&paint, SkShader::CreateBitmapShader(fBitmap, SkShader::kClamp_TileMode,
- SkShader::kClamp_TileMode), s);
+ SkShader::kClamp_TileMode, &s));
// draw the shader with a bitmap mask
canvas->drawBitmap(fMask, 0, 0, &paint);
@@ -94,7 +93,7 @@ protected:
canvas->translate(0, 25);
adopt_shader(&paint, SkShader::CreateBitmapShader(fMask, SkShader::kRepeat_TileMode,
- SkShader::kRepeat_TileMode), s);
+ SkShader::kRepeat_TileMode, &s));
paint.setColor(SK_ColorRED);
// draw the mask using the shader and a color
« no previous file with comments | « gm/bigmatrix.cpp ('k') | gm/clippedbitmapshaders.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698