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

Unified Diff: chrome/browser/ui/libgtkui/native_theme_gtk.cc

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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
Index: chrome/browser/ui/libgtkui/native_theme_gtk.cc
diff --git a/chrome/browser/ui/libgtkui/native_theme_gtk.cc b/chrome/browser/ui/libgtkui/native_theme_gtk.cc
index 0d91a9c13547d0407ffac878b661463210e09a02..a00e65172dc053c4abdbcb4cf09eff44af588622 100644
--- a/chrome/browser/ui/libgtkui/native_theme_gtk.cc
+++ b/chrome/browser/ui/libgtkui/native_theme_gtk.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/ui/libgtkui/gtk_ui.h"
#include "chrome/browser/ui/libgtkui/gtk_util.h"
#include "chrome/browser/ui/libgtkui/skia_utils_gtk.h"
+#include "skia/ext/cdl_paint.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/color_utils.h"
@@ -171,13 +172,13 @@ NativeThemeGtk2::NativeThemeGtk2() {}
NativeThemeGtk2::~NativeThemeGtk2() {}
void NativeThemeGtk2::PaintMenuPopupBackground(
- SkCanvas* canvas,
+ CdlCanvas* canvas,
const gfx::Size& size,
const MenuBackgroundExtraParams& menu_background) const {
if (menu_background.corner_radius > 0) {
- SkPaint paint;
- paint.setStyle(SkPaint::kFill_Style);
- paint.setFlags(SkPaint::kAntiAlias_Flag);
+ CdlPaint paint;
+ paint.setStyle(CdlPaint::kFill_Style);
+ paint.setAntiAlias(true);
paint.setColor(GetSystemColor(kColorId_MenuBackgroundColor));
gfx::Path path;
@@ -196,12 +197,12 @@ void NativeThemeGtk2::PaintMenuPopupBackground(
}
void NativeThemeGtk2::PaintMenuItemBackground(
- SkCanvas* canvas,
+ CdlCanvas* canvas,
State state,
const gfx::Rect& rect,
const MenuItemExtraParams& menu_item) const {
SkColor color;
- SkPaint paint;
+ CdlPaint paint;
switch (state) {
case NativeTheme::kNormal:
case NativeTheme::kDisabled:
« no previous file with comments | « chrome/browser/ui/libgtkui/native_theme_gtk.h ('k') | chrome/browser/ui/views/create_application_shortcut_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698