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

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

Issue 11275120: Virtual GL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « ui/gl/gl_context_cgl.cc ('k') | ui/gl/gl_context_glx.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_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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (!InitializeExtensionBindings()) { 113 if (!InitializeExtensionBindings()) {
114 ReleaseCurrent(surface); 114 ReleaseCurrent(surface);
115 return false; 115 return false;
116 } 116 }
117 117
118 if (!surface->OnMakeCurrent(this)) { 118 if (!surface->OnMakeCurrent(this)) {
119 LOG(ERROR) << "Could not make current."; 119 LOG(ERROR) << "Could not make current.";
120 return false; 120 return false;
121 } 121 }
122 122
123 SetRealGLApi();
123 return true; 124 return true;
124 } 125 }
125 126
126 void GLContextEGL::ReleaseCurrent(GLSurface* surface) { 127 void GLContextEGL::ReleaseCurrent(GLSurface* surface) {
127 if (!IsCurrent(surface)) 128 if (!IsCurrent(surface))
128 return; 129 return;
129 130
130 SetCurrent(NULL, NULL); 131 SetCurrent(NULL, NULL);
131 eglMakeCurrent(display_, 132 eglMakeCurrent(display_,
132 EGL_NO_SURFACE, 133 EGL_NO_SURFACE,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 179
179 bool GLContextEGL::WasAllocatedUsingRobustnessExtension() { 180 bool GLContextEGL::WasAllocatedUsingRobustnessExtension() {
180 return GLSurfaceEGL::IsCreateContextRobustnessSupported(); 181 return GLSurfaceEGL::IsCreateContextRobustnessSupported();
181 } 182 }
182 183
183 GLContextEGL::~GLContextEGL() { 184 GLContextEGL::~GLContextEGL() {
184 Destroy(); 185 Destroy();
185 } 186 }
186 187
187 } // namespace gfx 188 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_context_cgl.cc ('k') | ui/gl/gl_context_glx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698