From 642d8f97282ddbdb26f76ae6773e8bc459b4b15b Mon Sep 17 00:00:00 2001 From: reed Date: Fri, 11 Mar 2016 04:59:03 -0800 Subject: 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} --- ui/views/painter.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ui/views/painter.cc') 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 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()), -- cgit v1.1