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

Side by Side Diff: app/gfx/gl/gl_context_linux.cc

Issue 6340004: Linux: --single-process with GPU acceleration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Try rebasing off of ToT. Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « app/gfx/gl/gl_context_egl.cc ('k') | chrome/browser/gpu_process_host.cc » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // This file implements the ViewGLContext and PbufferGLContext classes. 5 // This file implements the ViewGLContext and PbufferGLContext classes.
6 6
7 #include "app/gfx/gl/gl_context.h" 7 #include "app/gfx/gl/gl_context.h"
8 8
9 extern "C" { 9 extern "C" {
10 #include <X11/Xlib.h> 10 #include <X11/Xlib.h>
(...skipping 10 matching lines...) Expand all
21 #include "base/basictypes.h" 21 #include "base/basictypes.h"
22 #include "base/logging.h" 22 #include "base/logging.h"
23 #include "base/scoped_ptr.h" 23 #include "base/scoped_ptr.h"
24 24
25 namespace { 25 namespace {
26 26
27 Display* GetXDisplayHelper() { 27 Display* GetXDisplayHelper() {
28 static Display* display = NULL; 28 static Display* display = NULL;
29 29
30 if (!display) { 30 if (!display) {
31 if (x11_util::XDisplayExists()) { 31 display = XOpenDisplay(NULL);
32 display = x11_util::GetXDisplay(); 32 CHECK(display);
33 } else {
34 display = XOpenDisplay(NULL);
35 }
36 } 33 }
34
37 return display; 35 return display;
38 } 36 }
39 37
40 } 38 } // namespace
41 39
42 namespace gfx { 40 namespace gfx {
43 41
44 typedef GLXContext GLContextHandle; 42 typedef GLXContext GLContextHandle;
45 typedef GLXPbuffer PbufferHandle; 43 typedef GLXPbuffer PbufferHandle;
46 44
47 class BaseLinuxGLContext : public GLContext { 45 class BaseLinuxGLContext : public GLContext {
48 public: 46 public:
49 virtual std::string GetExtensions(); 47 virtual std::string GetExtensions();
50 }; 48 };
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 } 820 }
823 case kGLImplementationMockGL: 821 case kGLImplementationMockGL:
824 return new StubGLContext; 822 return new StubGLContext;
825 default: 823 default:
826 NOTREACHED(); 824 NOTREACHED();
827 return NULL; 825 return NULL;
828 } 826 }
829 } 827 }
830 828
831 } // namespace gfx 829 } // namespace gfx
OLDNEW
« no previous file with comments | « app/gfx/gl/gl_context_egl.cc ('k') | chrome/browser/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698