summaryrefslogtreecommitdiffstats
path: root/ui/views/painter.cc
diff options
context:
space:
mode:
authorreed <reed@google.com>2016-03-11 04:59:03 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-11 13:00:21 +0000
commit642d8f97282ddbdb26f76ae6773e8bc459b4b15b (patch)
treed136e6ec545c7e1aa66ad1e1417c85df9377db02 /ui/views/painter.cc
parentccb033d86c3371aa90b079b7bac879fd536e02ad (diff)
downloadchromium_src-642d8f97282ddbdb26f76ae6773e8bc459b4b15b.zip
chromium_src-642d8f97282ddbdb26f76ae6773e8bc459b4b15b.tar.gz
chromium_src-642d8f97282ddbdb26f76ae6773e8bc459b4b15b.tar.bz2
Begin switch-over to using sk_sp (for SkShader for now)
This is not a complete conversion of setShader() sites, but is intended to be a canary, to tryout the new patterns. More will follow once this is approved. BUG=skia:5077 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1778913002 Cr-Commit-Position: refs/heads/master@{#380613}
Diffstat (limited to 'ui/views/painter.cc')
-rw-r--r--ui/views/painter.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/ui/views/painter.cc b/ui/views/painter.cc
index 0cc1f0d..8e0d3e6 100644
--- a/ui/views/painter.cc
+++ b/ui/views/painter.cc
@@ -151,10 +151,9 @@ void GradientPainter::Paint(gfx::Canvas* canvas, const gfx::Size& size) {
else
p[1].iset(0, size.height());
- skia::RefPtr<SkShader> s = skia::AdoptRef(SkGradientShader::CreateLinear(
+ paint.setShader(SkGradientShader::MakeLinear(
p, colors_.get(), pos_.get(), count_, SkShader::kClamp_TileMode));
paint.setStyle(SkPaint::kFill_Style);
- paint.setShader(s.get());
canvas->sk_canvas()->drawRectCoords(SkIntToScalar(0), SkIntToScalar(0),
SkIntToScalar(size.width()),