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

Side by Side Diff: ui/gl/gl_surface_glx.cc

Issue 2208743005: XInitThreads test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « ui/gl/gl_context_glx.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gl/gl_surface_glx.h" 5 #include "ui/gl/gl_surface_glx.h"
6 6
7 extern "C" { 7 extern "C" {
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 } 9 }
10 #include <memory> 10 #include <memory>
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 static bool initialized = false; 364 static bool initialized = false;
365 if (initialized) 365 if (initialized)
366 return true; 366 return true;
367 367
368 // http://crbug.com/245466 368 // http://crbug.com/245466
369 setenv("force_s3tc_enable", "true", 1); 369 setenv("force_s3tc_enable", "true", 1);
370 370
371 // SGIVideoSyncProviderShim (if instantiated) will issue X commands on 371 // SGIVideoSyncProviderShim (if instantiated) will issue X commands on
372 // it's own thread. 372 // it's own thread.
373 gfx::InitializeThreadedX11(); 373 gfx::InitializeThreadedX11();
374 LOG(ERROR) << "Called XInitThreads " << getpid();
374 g_display = gfx::GetXDisplay(); 375 g_display = gfx::GetXDisplay();
375 376
376 if (!g_display) { 377 if (!g_display) {
377 LOG(ERROR) << "XOpenDisplay failed."; 378 LOG(ERROR) << "XOpenDisplay failed.";
378 return false; 379 return false;
379 } 380 }
380 381
381 int major, minor; 382 int major, minor;
382 if (!glXQueryVersion(g_display, &major, &minor)) { 383 if (!glXQueryVersion(g_display, &major, &minor)) {
383 LOG(ERROR) << "glxQueryVersion failed"; 384 LOG(ERROR) << "glxQueryVersion failed";
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 if (!config_) 656 if (!config_)
656 config_ = GetConfigForWindow(g_display, window_); 657 config_ = GetConfigForWindow(g_display, window_);
657 return config_; 658 return config_;
658 } 659 }
659 660
660 UnmappedNativeViewGLSurfaceGLX::~UnmappedNativeViewGLSurfaceGLX() { 661 UnmappedNativeViewGLSurfaceGLX::~UnmappedNativeViewGLSurfaceGLX() {
661 Destroy(); 662 Destroy();
662 } 663 }
663 664
664 } // namespace gl 665 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_context_glx.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698