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

Unified Diff: gm/constcolorprocessor.cpp

Issue 1776973003: partial switch over to sp usage of shaders (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move into lua container 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/composeshader.cpp ('k') | gm/convexpolyclip.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/constcolorprocessor.cpp
diff --git a/gm/constcolorprocessor.cpp b/gm/constcolorprocessor.cpp
index 177a8c9e4fdc5c5d99b9c2ef7d988d4211b11190..8c91a722eccd07a11b94efda440c6ff41f6e9aa8 100644
--- a/gm/constcolorprocessor.cpp
+++ b/gm/constcolorprocessor.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2015 Google Inc.
*
@@ -43,8 +42,8 @@ protected:
void onOnceBeforeDraw() override {
SkColor colors[] = { 0xFFFF0000, 0x2000FF00, 0xFF0000FF};
SkPoint pts[] = { SkPoint::Make(0, 0), SkPoint::Make(kRectSize, kRectSize) };
- fShader.reset(SkGradientShader::CreateLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors),
- SkShader::kClamp_TileMode));
+ fShader = SkGradientShader::MakeLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors),
+ SkShader::kClamp_TileMode);
}
void onDraw(SkCanvas* canvas) override {
@@ -179,7 +178,7 @@ protected:
private:
// Use this as a way of generating and input FP
- SkAutoTUnref<SkShader> fShader;
+ sk_sp<SkShader> fShader;
static const SkScalar kPad;
static const SkScalar kRectSize;
« no previous file with comments | « gm/composeshader.cpp ('k') | gm/convexpolyclip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698