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

Unified Diff: gm/giantbitmap.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/drawbitmaprect.cpp ('k') | gm/gradient_matrix.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/giantbitmap.cpp
diff --git a/gm/giantbitmap.cpp b/gm/giantbitmap.cpp
index c284809b16af530e3bb5557f774d50000d3d094c..ed4190a8145e0248a12e4e7cc17bfb018ceaf568 100644
--- a/gm/giantbitmap.cpp
+++ b/gm/giantbitmap.cpp
@@ -95,7 +95,6 @@ protected:
virtual void onDraw(SkCanvas* canvas) {
SkPaint paint;
- SkShader* s = SkShader::CreateBitmapShader(getBitmap(), fMode, fMode);
SkMatrix m;
if (fDoRotate) {
@@ -106,7 +105,7 @@ protected:
SkScalar scale = 11*SK_Scalar1/12;
m.setScale(scale, scale);
}
- s->setLocalMatrix(m);
+ SkShader* s = SkShader::CreateBitmapShader(getBitmap(), fMode, fMode, &m);
paint.setShader(s)->unref();
paint.setFilterLevel(fDoFilter ? SkPaint::kLow_FilterLevel : SkPaint::kNone_FilterLevel);
« no previous file with comments | « gm/drawbitmaprect.cpp ('k') | gm/gradient_matrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698