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

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

Issue 2129043003: Make dynamic mock bindings initialization consistent with other GL implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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') | ui/gl/gl_context_stub.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) 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/geometry/size.h" 10 #include "ui/gfx/geometry/size.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // Track that we're no longer in a released state to workaround a mesa issue. 76 // Track that we're no longer in a released state to workaround a mesa issue.
77 is_released_ = false; 77 is_released_ = false;
78 78
79 // Set this as soon as the context is current, since we might call into GL. 79 // Set this as soon as the context is current, since we might call into GL.
80 SetRealGLApi(); 80 SetRealGLApi();
81 81
82 // Row 0 is at the top. 82 // Row 0 is at the top.
83 OSMesaPixelStore(OSMESA_Y_UP, 0); 83 OSMesaPixelStore(OSMESA_Y_UP, 0);
84 84
85 SetCurrent(surface); 85 SetCurrent(surface);
86 if (!InitializeDynamicBindings()) { 86 InitializeDynamicBindings();
87 return false;
88 }
89 87
90 if (!surface->OnMakeCurrent(this)) { 88 if (!surface->OnMakeCurrent(this)) {
91 LOG(ERROR) << "Could not make current."; 89 LOG(ERROR) << "Could not make current.";
92 return false; 90 return false;
93 } 91 }
94 92
95 release_current.Cancel(); 93 release_current.Cancel();
96 return true; 94 return true;
97 } 95 }
98 96
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 142
145 void GLContextOSMesa::OnSetSwapInterval(int interval) { 143 void GLContextOSMesa::OnSetSwapInterval(int interval) {
146 DCHECK(IsCurrent(nullptr)); 144 DCHECK(IsCurrent(nullptr));
147 } 145 }
148 146
149 GLContextOSMesa::~GLContextOSMesa() { 147 GLContextOSMesa::~GLContextOSMesa() {
150 Destroy(); 148 Destroy();
151 } 149 }
152 150
153 } // namespace gl 151 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_context_glx.cc ('k') | ui/gl/gl_context_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698