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

Unified Diff: gm/mixedxfermodes.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/hairmodes.cpp ('k') | gm/shaderbounds.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/mixedxfermodes.cpp
diff --git a/gm/mixedxfermodes.cpp b/gm/mixedxfermodes.cpp
index 45623255571e26984ebb286a9124833cbc3b1f38..f2d7fa3b916e7ed274b5b8b4fb8f93a97c803843 100644
--- a/gm/mixedxfermodes.cpp
+++ b/gm/mixedxfermodes.cpp
@@ -86,13 +86,13 @@ protected:
SkBitmap bitmap;
bitmap.allocN32Pixels(2, 2);
memcpy(bitmap.getPixels(), kCheckerPixelData, sizeof(kCheckerPixelData));
+ SkMatrix lm;
+ lm.setScale(SkIntToScalar(20), SkIntToScalar(20));
fBG.reset(SkShader::CreateBitmapShader(bitmap,
SkShader::kRepeat_TileMode,
- SkShader::kRepeat_TileMode));
+ SkShader::kRepeat_TileMode,
+ &lm));
}
- SkMatrix lm;
- lm.setScale(SkIntToScalar(20), SkIntToScalar(20));
- fBG->setLocalMatrix(lm);
SkPaint bgPaint;
bgPaint.setShader(fBG.get());
« no previous file with comments | « gm/hairmodes.cpp ('k') | gm/shaderbounds.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698