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

Unified Diff: ui/native_theme/native_theme_mac.mm

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem Created 3 years, 11 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/native_theme/native_theme_mac.h ('k') | ui/native_theme/native_theme_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bcb69cc6703215bb78910b4d180bd9d5a1c05514..c8b39a34dc8dfbffcca03709e159ae50bbf42472 100644
--- a/ui/native_theme/native_theme_mac.mm
+++ b/ui/native_theme/native_theme_mac.mm
@@ -253,10 +253,10 @@ SkColor NativeThemeMac::GetSystemColor(ColorId color_id) const {
}
void NativeThemeMac::PaintMenuPopupBackground(
- SkCanvas* canvas,
+ cc::PaintCanvas* canvas,
const gfx::Size& size,
const MenuBackgroundExtraParams& menu_background) const {
- SkPaint paint;
+ cc::PaintFlags paint;
paint.setAntiAlias(true);
if (base::mac::IsOS10_9())
paint.setColor(kMenuPopupBackgroundColorMavericks);
@@ -268,11 +268,11 @@ void NativeThemeMac::PaintMenuPopupBackground(
}
void NativeThemeMac::PaintMenuItemBackground(
- SkCanvas* canvas,
+ cc::PaintCanvas* canvas,
State state,
const gfx::Rect& rect,
const MenuItemExtraParams& menu_item) const {
- SkPaint paint;
+ cc::PaintFlags paint;
switch (state) {
case NativeTheme::kNormal:
case NativeTheme::kDisabled:
@@ -370,7 +370,7 @@ sk_sp<SkShader> NativeThemeMac::GetButtonBorderShader(ButtonBackgroundType type,
}
// static
-void NativeThemeMac::PaintStyledGradientButton(SkCanvas* canvas,
+void NativeThemeMac::PaintStyledGradientButton(cc::PaintCanvas* canvas,
const gfx::Rect& integer_bounds,
ButtonBackgroundType type,
bool round_left,
@@ -409,20 +409,22 @@ void NativeThemeMac::PaintStyledGradientButton(SkCanvas* canvas,
else
shape.setRect(bounds);
- SkPaint paint;
- paint.setStyle(SkPaint::kFill_Style);
+ cc::PaintFlags paint;
+ paint.setStyle(cc::PaintFlags::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(
+ cc::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(
+ cc::WrapSkShader(GetButtonBackgroundShader(type, shape.height())));
canvas->drawRRect(shape, paint);
if (!focus)
« no previous file with comments | « ui/native_theme/native_theme_mac.h ('k') | ui/native_theme/native_theme_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698