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

Unified Diff: base/message_pump_gtk.cc

Issue 10078018: Final(?) eradications of GDK / GTK from the GPU process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « no previous file | content/gpu/gpu_main.cc » ('j') | content/gpu/gpu_main.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_pump_gtk.cc
===================================================================
--- base/message_pump_gtk.cc (revision 132496)
+++ base/message_pump_gtk.cc (working copy)
@@ -88,7 +88,13 @@
// static
Display* MessagePumpGtk::GetDefaultXDisplay() {
darin (slow to review) 2012/04/23 16:52:57 why do we need to involve a class named *Gtk in co
static GdkDisplay* display = gdk_display_get_default();
- return display ? GDK_DISPLAY_XDISPLAY(display) : NULL;
+ if (!display) {
+ // GTK / GDK has not been initialized, which is a decision we wish to
+ // support, for example for the GPU process.
+ static Display* xdisplay = XOpenDisplay(NULL);
+ return xdisplay;
+ }
+ return GDK_DISPLAY_XDISPLAY(display);
}
void MessagePumpGtk::WillProcessEvent(GdkEvent* event) {
« no previous file with comments | « no previous file | content/gpu/gpu_main.cc » ('j') | content/gpu/gpu_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698