Commit 0dbf6574 authored by deanm@chromium.org's avatar deanm@chromium.org

Back to creating a new GC for each expose.

The style (or at least the GCs) are shared across widgets, so they shouldn't
be modified, or should be restored.  Creating a GC should be cheap enough, I
was overthinking this.

Review URL: http://codereview.chromium.org/100161


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14845 0039d316-1c4b-4281-b951-d872f2087c98
parent d43c374d
...@@ -388,8 +388,7 @@ gboolean AutocompletePopupViewGtk::HandleExpose(GtkWidget* widget, ...@@ -388,8 +388,7 @@ gboolean AutocompletePopupViewGtk::HandleExpose(GtkWidget* widget,
return TRUE; return TRUE;
GdkDrawable* drawable = GDK_DRAWABLE(event->window); GdkDrawable* drawable = GDK_DRAWABLE(event->window);
// We don't actually care about the style, we just need a GC. GdkGC* gc = gdk_gc_new(drawable);
GdkGC* gc = widget->style->black_gc;
// kBorderColor is unallocated, so use the GdkRGB routine. // kBorderColor is unallocated, so use the GdkRGB routine.
gdk_gc_set_rgb_fg_color(gc, &kBorderColor); gdk_gc_set_rgb_fg_color(gc, &kBorderColor);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment