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

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

Issue 94963003: Take GL version and extensions correctly into account when binding functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Improve Windows initialization and renderBufferMultisample explanation Created 7 years 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_surface_win.cc ('k') | ui/gl/gl_version_info.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) 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.h" 5 #include "ui/gl/gl_surface.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 private: 45 private:
46 GC window_graphics_context_; 46 GC window_graphics_context_;
47 gfx::AcceleratedWidget window_; 47 gfx::AcceleratedWidget window_;
48 GC pixmap_graphics_context_; 48 GC pixmap_graphics_context_;
49 Pixmap pixmap_; 49 Pixmap pixmap_;
50 50
51 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceOSMesa); 51 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceOSMesa);
52 }; 52 };
53 53
54 bool GLSurface::InitializePreBindingsInternal(GLImplementation) {
55 return true;
56 }
57
54 bool GLSurface::InitializeOneOffInternal() { 58 bool GLSurface::InitializeOneOffInternal() {
55 switch (GetGLImplementation()) { 59 switch (GetGLImplementation()) {
56 case kGLImplementationDesktopGL: 60 case kGLImplementationDesktopGL:
57 if (!GLSurfaceGLX::InitializeOneOff()) { 61 if (!GLSurfaceGLX::InitializeOneOff()) {
58 LOG(ERROR) << "GLSurfaceGLX::InitializeOneOff failed."; 62 LOG(ERROR) << "GLSurfaceGLX::InitializeOneOff failed.";
59 return false; 63 return false;
60 } 64 }
61 break; 65 break;
62 case kGLImplementationOSMesaGL: 66 case kGLImplementationOSMesaGL:
63 if (!NativeViewGLSurfaceOSMesa::InitializeOneOff()) { 67 if (!NativeViewGLSurfaceOSMesa::InitializeOneOff()) {
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 331 }
328 case kGLImplementationMockGL: 332 case kGLImplementationMockGL:
329 return new GLSurfaceStub; 333 return new GLSurfaceStub;
330 default: 334 default:
331 NOTREACHED(); 335 NOTREACHED();
332 return NULL; 336 return NULL;
333 } 337 }
334 } 338 }
335 339
336 } // namespace gfx 340 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_win.cc ('k') | ui/gl/gl_version_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698