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

Unified Diff: gm/shadertext2.cpp

Issue 1790353002: Revert of more shader-->sp conversions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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/shadertext.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 2ec195259928ed86580e385eb68ad1f744daedd7..74f01a0c9d30e37105696718a90661bf4117a614 100644
--- a/gm/shadertext2.cpp
+++ b/gm/shadertext2.cpp
@@ -24,11 +24,11 @@
SkPaint paint;
- paint.setShader(SkGradientShader::MakeLinear(kPts0, kColors0, kPos,
- SK_ARRAY_COUNT(kColors0), SkShader::kClamp_TileMode));
+ paint.setShader(SkGradientShader::CreateLinear(kPts0, kColors0, kPos,
+ SK_ARRAY_COUNT(kColors0), SkShader::kClamp_TileMode))->unref();
canvas.drawPaint(paint);
- paint.setShader(SkGradientShader::MakeLinear(kPts1, kColors1, kPos,
- SK_ARRAY_COUNT(kColors1), SkShader::kClamp_TileMode));
+ paint.setShader(SkGradientShader::CreateLinear(kPts1, kColors1, kPos,
+ SK_ARRAY_COUNT(kColors1), SkShader::kClamp_TileMode))->unref();
canvas.drawPaint(paint);
}
@@ -136,9 +136,11 @@
canvas->translate(0, kPadY / 2 + kPointSize);
columnH += kPadY / 2 + kPointSize;
for (int lm = 0; lm < localMatrices.count(); ++lm) {
- paint.setShader(SkShader::MakeBitmapShader(bmp, SkShader::kMirror_TileMode,
- SkShader::kRepeat_TileMode,
- &localMatrices[lm].fMatrix));
+ paint.setShader(
+ SkShader::CreateBitmapShader(bmp,
+ SkShader::kMirror_TileMode,
+ SkShader::kRepeat_TileMode,
+ &localMatrices[lm].fMatrix))->unref();
canvas->save();
canvas->concat(matrices[m].fMatrix);
« no previous file with comments | « gm/shadertext.cpp ('k') | gm/shadertext3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698