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

Unified Diff: gm/drawbitmaprect.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/convexpolyclip.cpp ('k') | gm/giantbitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/drawbitmaprect.cpp
diff --git a/gm/drawbitmaprect.cpp b/gm/drawbitmaprect.cpp
index 92e0c384f592efd70c5dea7e01eb2c6cbaf7344c..3cc902631121d84f582ab1a6b7bc0f91885843b4 100644
--- a/gm/drawbitmaprect.cpp
+++ b/gm/drawbitmaprect.cpp
@@ -55,15 +55,15 @@ static void makebm(SkBitmap* bm, int w, int h) {
SK_Scalar1};
SkPaint paint;
- paint.setShader(SkGradientShader::CreateRadial(
- pt, radius,
- colors, pos,
- SK_ARRAY_COUNT(colors),
- SkShader::kRepeat_TileMode))->unref();
SkRect rect = SkRect::MakeWH(wScalar, hScalar);
SkMatrix mat = SkMatrix::I();
for (int i = 0; i < 4; ++i) {
- paint.getShader()->setLocalMatrix(mat);
+ paint.setShader(SkGradientShader::CreateRadial(
+ pt, radius,
+ colors, pos,
+ SK_ARRAY_COUNT(colors),
+ SkShader::kRepeat_TileMode,
+ NULL, 0, &mat))->unref();
canvas.drawRect(rect, paint);
rect.inset(wScalar / 8, hScalar / 8);
mat.postScale(SK_Scalar1 / 4, SK_Scalar1 / 4);
« no previous file with comments | « gm/convexpolyclip.cpp ('k') | gm/giantbitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698