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

Unified Diff: gm/shadertext2.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/shaderbounds.cpp ('k') | gm/shadertext3.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/shadertext2.cpp
diff --git a/gm/shadertext2.cpp b/gm/shadertext2.cpp
index f839161dae395787ba507467ab5b855a43df3330..e580d91e1e5b59a3aef6e97ce54ac0cdee25fc31 100644
--- a/gm/shadertext2.cpp
+++ b/gm/shadertext2.cpp
@@ -95,14 +95,10 @@ protected:
makebm(&bmp, kPointSize / 2, kPointSize / 2);
}
- SkAutoTUnref<SkShader> shader(SkShader::CreateBitmapShader(bmp,
- SkShader::kMirror_TileMode,
- SkShader::kRepeat_TileMode));
SkPaint fillPaint;
fillPaint.setAntiAlias(true);
fillPaint.setTextSize(SkIntToScalar(kPointSize));
fillPaint.setFilterLevel(SkPaint::kLow_FilterLevel);
- fillPaint.setShader(shader);
SkPaint outlinePaint;
outlinePaint.setAntiAlias(true);
@@ -158,7 +154,10 @@ protected:
canvas->translate(0, kPadY / 2 + kPointSize);
columnH += kPadY / 2 + kPointSize;
for (int lm = 0; lm < localMatrices.count(); ++lm) {
- shader->setLocalMatrix(localMatrices[lm].fMatrix);
+ paint.setShader(SkShader::CreateBitmapShader(bmp,
+ SkShader::kMirror_TileMode,
+ SkShader::kRepeat_TileMode,
+ &localMatrices[lm].fMatrix));
canvas->save();
canvas->concat(matrices[m].fMatrix);
« no previous file with comments | « gm/shaderbounds.cpp ('k') | gm/shadertext3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698