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

Side by Side Diff: ui/gl/gl_context_osmesa.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_context_nsview.mm ('k') | ui/gl/gl_context_stub_with_extensions.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_context_osmesa.h" 5 #include "ui/gl/gl_context_osmesa.h"
6 6
7 #include <GL/osmesa.h> 7 #include <GL/osmesa.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/gfx/size.h" 10 #include "ui/gfx/size.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 return false; 62 return false;
63 } 63 }
64 64
65 // Set this as soon as the context is current, since we might call into GL. 65 // Set this as soon as the context is current, since we might call into GL.
66 SetRealGLApi(); 66 SetRealGLApi();
67 67
68 // Row 0 is at the top. 68 // Row 0 is at the top.
69 OSMesaPixelStore(OSMESA_Y_UP, 0); 69 OSMesaPixelStore(OSMESA_Y_UP, 0);
70 70
71 SetCurrent(surface); 71 SetCurrent(surface);
72 if (!InitializeExtensionBindings()) { 72 if (!InitializeDynamicBindings()) {
73 ReleaseCurrent(surface); 73 ReleaseCurrent(surface);
74 return false; 74 return false;
75 } 75 }
76 76
77 if (!surface->OnMakeCurrent(this)) { 77 if (!surface->OnMakeCurrent(this)) {
78 LOG(ERROR) << "Could not make current."; 78 LOG(ERROR) << "Could not make current.";
79 return false; 79 return false;
80 } 80 }
81 81
82 return true; 82 return true;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 void GLContextOSMesa::SetSwapInterval(int interval) { 124 void GLContextOSMesa::SetSwapInterval(int interval) {
125 DCHECK(IsCurrent(NULL)); 125 DCHECK(IsCurrent(NULL));
126 } 126 }
127 127
128 GLContextOSMesa::~GLContextOSMesa() { 128 GLContextOSMesa::~GLContextOSMesa() {
129 Destroy(); 129 Destroy();
130 } 130 }
131 131
132 } // namespace gfx 132 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_context_nsview.mm ('k') | ui/gl/gl_context_stub_with_extensions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698