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

Unified Diff: gm/pictureshader.cpp

Issue 245963010: Move SkShader::fLocalMatrix into SkShader constructor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add SkLocalMatrixShaderWrapper 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
Index: gm/pictureshader.cpp
diff --git a/gm/pictureshader.cpp b/gm/pictureshader.cpp
index 195ee738bc9ba71dad1068581a6fd6808f2a7a77..a355c37aabc5617cf673af5bf38f4e95ea63f570 100644
--- a/gm/pictureshader.cpp
+++ b/gm/pictureshader.cpp
@@ -141,14 +141,14 @@ private:
canvas->drawRect(SkRect::MakeWH(fSceneSize, fSceneSize), paint);
canvas->drawRect(SkRect::MakeXYWH(fSceneSize * 1.1f, 0, fSceneSize, fSceneSize), paint);
- fPictureShaders[tileMode]->setLocalMatrix(localMatrix);
- paint.setShader(fPictureShaders[tileMode].get());
+ paint.setShader(SkShader::CreateLocalMatrixWrapper(fPictureShaders[tileMode].get(),
+ localMatrix));
canvas->drawRect(SkRect::MakeWH(fSceneSize, fSceneSize), paint);
canvas->translate(fSceneSize * 1.1f, 0);
- fBitmapShaders[tileMode]->setLocalMatrix(localMatrix);
- paint.setShader(fBitmapShaders[tileMode].get());
+ paint.setShader(SkShader::CreateLocalMatrixWrapper(fBitmapShaders[tileMode].get(),
+ localMatrix));
canvas->drawRect(SkRect::MakeWH(fSceneSize, fSceneSize), paint);
canvas->restore();
« no previous file with comments | « gm/mixedxfermodes.cpp ('k') | gm/shaderbounds.cpp » ('j') | include/core/SkShader.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698