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

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

Issue 16894002: Unset GL Api when releasing a context. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
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_egl.h" 5 #include "ui/gl/gl_context_egl.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 "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 SetRealGLApi(); 116 SetRealGLApi();
117 117
118 SetCurrent(surface); 118 SetCurrent(surface);
119 if (!InitializeExtensionBindings()) { 119 if (!InitializeExtensionBindings()) {
120 ReleaseCurrent(surface); 120 ReleaseCurrent(surface);
121 return false; 121 return false;
122 } 122 }
123 123
124 if (!surface->OnMakeCurrent(this)) { 124 if (!surface->OnMakeCurrent(this)) {
125 LOG(ERROR) << "Could not make current."; 125 LOG(ERROR) << "Could not make current.";
126 ReleaseCurrent(surface);
126 return false; 127 return false;
127 } 128 }
128 129
129 return true; 130 return true;
130 } 131 }
131 132
132 void GLContextEGL::SetUnbindFboOnMakeCurrent() { 133 void GLContextEGL::SetUnbindFboOnMakeCurrent() {
133 unbind_fbo_on_makecurrent_ = true; 134 unbind_fbo_on_makecurrent_ = true;
134 } 135 }
135 136
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 200
200 #if !defined(OS_ANDROID) 201 #if !defined(OS_ANDROID)
201 bool GLContextEGL::GetTotalGpuMemory(size_t* bytes) { 202 bool GLContextEGL::GetTotalGpuMemory(size_t* bytes) {
202 DCHECK(bytes); 203 DCHECK(bytes);
203 *bytes = 0; 204 *bytes = 0;
204 return false; 205 return false;
205 } 206 }
206 #endif 207 #endif
207 208
208 } // namespace gfx 209 } // namespace gfx
OLDNEW
« ui/gl/gl_bindings.h ('K') | « ui/gl/gl_context_cgl.cc ('k') | ui/gl/gl_context_osmesa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698