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

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

Issue 6325005: Relanding r71472.... Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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 | « no previous file | app/gfx/gl/gl_implementation.h » ('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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 ::XFree(x); 181 ::XFree(x);
182 } 182 }
183 }; 183 };
184 184
185 bool GLContext::InitializeOneOff() { 185 bool GLContext::InitializeOneOff() {
186 static bool initialized = false; 186 static bool initialized = false;
187 if (initialized) 187 if (initialized)
188 return true; 188 return true;
189 189
190 static const GLImplementation kAllowedGLImplementations[] = { 190 static const GLImplementation kAllowedGLImplementations[] = {
191 kGLImplementationDesktopGL,
191 kGLImplementationEGLGLES2, 192 kGLImplementationEGLGLES2,
192 kGLImplementationDesktopGL,
193 kGLImplementationOSMesaGL 193 kGLImplementationOSMesaGL
194 }; 194 };
195 195
196 if (!InitializeBestGLBindings( 196 if (!InitializeBestGLBindings(
197 kAllowedGLImplementations, 197 kAllowedGLImplementations,
198 kAllowedGLImplementations + arraysize(kAllowedGLImplementations))) { 198 kAllowedGLImplementations + arraysize(kAllowedGLImplementations))) {
199 LOG(ERROR) << "InitializeBestGLBindings failed."; 199 LOG(ERROR) << "InitializeBestGLBindings failed.";
200 return false; 200 return false;
201 } 201 }
202 202
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 } 822 }
823 case kGLImplementationMockGL: 823 case kGLImplementationMockGL:
824 return new StubGLContext; 824 return new StubGLContext;
825 default: 825 default:
826 NOTREACHED(); 826 NOTREACHED();
827 return NULL; 827 return NULL;
828 } 828 }
829 } 829 }
830 830
831 } // namespace gfx 831 } // namespace gfx
OLDNEW
« no previous file with comments | « no previous file | app/gfx/gl/gl_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698