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

Unified Diff: ui/native_theme/native_theme_base.cc

Issue 1831883002: Use sk_sp-based shader creation APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 | « ui/gfx/skia_util.cc ('k') | ui/native_theme/native_theme_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/native_theme_base.cc
diff --git a/ui/native_theme/native_theme_base.cc b/ui/native_theme/native_theme_base.cc
index 9dbeceeff4176f6e2f6fd0e49eca6b2a11a489e3..017b07afe9675c99b1c2fc2e4b1362d12cd26732 100644
--- a/ui/native_theme/native_theme_base.cc
+++ b/ui/native_theme/native_theme_base.cc
@@ -698,12 +698,11 @@ void NativeThemeBase::PaintButton(SkCanvas* canvas,
std::swap(gradient_bounds[0], gradient_bounds[1]);
SkColor colors[2] = { light_color, base_color };
- skia::RefPtr<SkShader> shader = skia::AdoptRef(
- SkGradientShader::CreateLinear(
- gradient_bounds, colors, NULL, 2, SkShader::kClamp_TileMode));
paint.setStyle(SkPaint::kFill_Style);
paint.setAntiAlias(true);
- paint.setShader(shader.get());
+ paint.setShader(
+ SkGradientShader::MakeLinear(
+ gradient_bounds, colors, NULL, 2, SkShader::kClamp_TileMode));
canvas->drawRoundRect(skrect, SkIntToScalar(1), SkIntToScalar(1), paint);
paint.setShader(NULL);
« no previous file with comments | « ui/gfx/skia_util.cc ('k') | ui/native_theme/native_theme_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698