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 4a2fb957ed0f5ebfbc1249410ed20b8e6ee846ab..3b0a1243cb8f3d85a848919b519e57f48e2adf41 100644 |
--- a/ui/native_theme/native_theme_base.cc |
+++ b/ui/native_theme/native_theme_base.cc |
@@ -9,6 +9,7 @@ |
#include "base/command_line.h" |
#include "base/logging.h" |
+#include "base/memory/ptr_util.h" |
#include "cc/paint/paint_flags.h" |
#include "cc/paint/paint_shader.h" |
#include "third_party/skia/include/core/SkPath.h" |
@@ -601,11 +602,11 @@ SkRect NativeThemeBase::PaintCheckboxRadioCommon( |
SkColor colors[3] = {startEndColors[0], startEndColors[0], startEndColors[1]}; |
cc::PaintFlags flags; |
flags.setAntiAlias(true); |
- flags.setShader(cc::WrapSkShader(SkGradientShader::MakeLinear( |
- gradient_bounds, colors, NULL, 3, SkShader::kClamp_TileMode))); |
+ flags.setShader(base::MakeUnique<cc::PaintShader>( |
+ gradient_bounds, colors, nullptr, 3, SkShader::kClamp_TileMode)); |
flags.setStyle(cc::PaintFlags::kFill_Style); |
canvas->drawRoundRect(skrect, borderRadius, borderRadius, flags); |
- flags.setShader(NULL); |
+ flags.setShader(nullptr); |
// Draw the border. |
if (state == kHovered) |
@@ -682,11 +683,11 @@ void NativeThemeBase::PaintButton(cc::PaintCanvas* canvas, |
flags.setStyle(cc::PaintFlags::kFill_Style); |
flags.setAntiAlias(true); |
- flags.setShader(cc::WrapSkShader(SkGradientShader::MakeLinear( |
- gradient_bounds, colors, NULL, 2, SkShader::kClamp_TileMode))); |
+ flags.setShader(base::MakeUnique<cc::PaintShader>( |
+ gradient_bounds, colors, nullptr, 2, SkShader::kClamp_TileMode)); |
canvas->drawRoundRect(skrect, SkIntToScalar(1), SkIntToScalar(1), flags); |
- flags.setShader(NULL); |
+ flags.setShader(nullptr); |
if (button.has_border) { |
int border_alpha = state == kHovered ? 0x80 : 0x55; |