| Index: ui/native_theme/native_theme_mac.mm
|
| diff --git a/ui/native_theme/native_theme_mac.mm b/ui/native_theme/native_theme_mac.mm
|
| index 36a58dc1d810ba40479bf2b03a421c9b16c67f28..7e1bb77f435b56aecb199e4b97634bed68c61d56 100644
|
| --- a/ui/native_theme/native_theme_mac.mm
|
| +++ b/ui/native_theme/native_theme_mac.mm
|
| @@ -252,10 +252,10 @@ SkColor NativeThemeMac::GetSystemColor(ColorId color_id) const {
|
| }
|
|
|
| void NativeThemeMac::PaintMenuPopupBackground(
|
| - SkCanvas* canvas,
|
| + CdlCanvas* canvas,
|
| const gfx::Size& size,
|
| const MenuBackgroundExtraParams& menu_background) const {
|
| - SkPaint paint;
|
| + CdlPaint paint;
|
| paint.setAntiAlias(true);
|
| if (base::mac::IsOS10_9())
|
| paint.setColor(kMenuPopupBackgroundColorMavericks);
|
| @@ -267,11 +267,11 @@ void NativeThemeMac::PaintMenuPopupBackground(
|
| }
|
|
|
| void NativeThemeMac::PaintMenuItemBackground(
|
| - SkCanvas* canvas,
|
| + CdlCanvas* canvas,
|
| State state,
|
| const gfx::Rect& rect,
|
| const MenuItemExtraParams& menu_item) const {
|
| - SkPaint paint;
|
| + CdlPaint paint;
|
| switch (state) {
|
| case NativeTheme::kNormal:
|
| case NativeTheme::kDisabled:
|
| @@ -369,7 +369,7 @@ sk_sp<SkShader> NativeThemeMac::GetButtonBorderShader(ButtonBackgroundType type,
|
| }
|
|
|
| // static
|
| -void NativeThemeMac::PaintStyledGradientButton(SkCanvas* canvas,
|
| +void NativeThemeMac::PaintStyledGradientButton(CdlCanvas* canvas,
|
| const gfx::Rect& integer_bounds,
|
| ButtonBackgroundType type,
|
| bool round_left,
|
| @@ -408,20 +408,22 @@ void NativeThemeMac::PaintStyledGradientButton(SkCanvas* canvas,
|
| else
|
| shape.setRect(bounds);
|
|
|
| - SkPaint paint;
|
| - paint.setStyle(SkPaint::kFill_Style);
|
| + CdlPaint paint;
|
| + paint.setStyle(CdlPaint::kFill_Style);
|
| paint.setAntiAlias(true);
|
|
|
| // First draw the darker "outer" border, with its gradient and shadow. Inside
|
| // a tab strip, this will draw over the outer border and inner separator.
|
| paint.setLooper(gfx::CreateShadowDrawLooper(shadows));
|
| - paint.setShader(GetButtonBorderShader(type, shape.height()));
|
| + paint.setShader(
|
| + CdlShader::WrapSkShader(GetButtonBorderShader(type, shape.height())));
|
| canvas->drawRRect(shape, paint);
|
|
|
| // Then, inset the rounded rect and draw over that with the inner gradient.
|
| shape.inset(kBorderThickness, kBorderThickness);
|
| paint.setLooper(nullptr);
|
| - paint.setShader(GetButtonBackgroundShader(type, shape.height()));
|
| + paint.setShader(
|
| + CdlShader::WrapSkShader(GetButtonBackgroundShader(type, shape.height())));
|
| canvas->drawRRect(shape, paint);
|
|
|
| if (!focus)
|
|
|