Index: chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc |
diff --git a/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc b/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc |
index b7c931a5aadbb095d51b9153c4dac9ba5ac1cb14..55f3713cdb3fab372551e6e3cff3d98f5df142c6 100644 |
--- a/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc |
+++ b/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc |
@@ -495,41 +495,13 @@ GtkStyle* NativeThemeGtk2::GetMenuItemStyle() const { |
} |
void NativeThemeGtk2::PaintComboboxArrow(SkCanvas* canvas, |
- GtkStateType state, |
+ GtkStateFlags state, |
const gfx::Rect& rect) const { |
- GdkPixmap* pm = gdk_pixmap_new(gtk_widget_get_window(GetRealizedWindow()), |
- rect.width(), |
- rect.height(), |
- -1); |
- // Paint the background. |
- gtk_paint_flat_box(GetWindowStyle(), |
- pm, |
- state, |
- GTK_SHADOW_NONE, |
- NULL, |
- GetRealizedWindow(), |
- NULL, 0, 0, rect.width(), rect.height()); |
- gtk_paint_arrow(GetWindowStyle(), |
- pm, |
- state, |
- GTK_SHADOW_NONE, |
- NULL, |
- GetRealizedWindow(), |
- NULL, |
- GTK_ARROW_DOWN, |
- true, |
- 0, 0, rect.width(), rect.height()); |
- GdkPixbuf* pb = gdk_pixbuf_get_from_drawable(NULL, |
- pm, |
- gdk_drawable_get_colormap(pm), |
- 0, 0, |
- 0, 0, |
- rect.width(), rect.height()); |
- SkBitmap arrow = GdkPixbufToImageSkia(pb); |
- canvas->drawBitmap(arrow, rect.x(), rect.y()); |
+ SkBitmap arrow; |
+ arrow.allocN32Pixels(rect.width(), rect.height()); |
+ arrow.eraseColor(0); |
- g_object_unref(pb); |
- g_object_unref(pm); |
+ canvas->drawBitmap(arrow, rect.x(), rect.y()); |
} |
} // namespace libgtk2ui |