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

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

Issue 1390143002: Revert of Re-land: ui: Add GLImage unit test framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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_api_unittest.cc ('k') | ui/gl/gl_gl_api_implementation.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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/cancelable_callback.h" 8 #include "base/cancelable_callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 force_swap_interval_zero_ = force; 199 force_swap_interval_zero_ = force;
200 OnSetSwapInterval(force_swap_interval_zero_ ? 0 : swap_interval_); 200 OnSetSwapInterval(force_swap_interval_zero_ ? 0 : swap_interval_);
201 } 201 }
202 202
203 bool GLContext::WasAllocatedUsingRobustnessExtension() { 203 bool GLContext::WasAllocatedUsingRobustnessExtension() {
204 return false; 204 return false;
205 } 205 }
206 206
207 bool GLContext::InitializeDynamicBindings() { 207 bool GLContext::InitializeDynamicBindings() {
208 DCHECK(IsCurrent(nullptr)); 208 DCHECK(IsCurrent(nullptr));
209 bool initialized = InitializeDynamicGLBindings(GetGLImplementation(), this); 209 static bool initialized = false;
210 if (initialized)
211 return initialized;
212 initialized = InitializeDynamicGLBindings(GetGLImplementation(), this);
210 if (!initialized) 213 if (!initialized)
211 LOG(ERROR) << "Could not initialize dynamic bindings."; 214 LOG(ERROR) << "Could not initialize dynamic bindings.";
212 return initialized; 215 return initialized;
213 } 216 }
214 217
215 void GLContext::SetupForVirtualization() { 218 void GLContext::SetupForVirtualization() {
216 if (!virtual_gl_api_) { 219 if (!virtual_gl_api_) {
217 virtual_gl_api_.reset(new VirtualGLApi()); 220 virtual_gl_api_.reset(new VirtualGLApi());
218 virtual_gl_api_->Initialize(&g_driver_gl, this); 221 virtual_gl_api_->Initialize(&g_driver_gl, this);
219 } 222 }
(...skipping 27 matching lines...) Expand all
247 } 250 }
248 251
249 GLContextReal::~GLContextReal() {} 252 GLContextReal::~GLContextReal() {}
250 253
251 void GLContextReal::SetCurrent(GLSurface* surface) { 254 void GLContextReal::SetCurrent(GLSurface* surface) {
252 GLContext::SetCurrent(surface); 255 GLContext::SetCurrent(surface);
253 current_real_context_.Pointer()->Set(surface ? this : nullptr); 256 current_real_context_.Pointer()->Set(surface ? this : nullptr);
254 } 257 }
255 258
256 } // namespace gfx 259 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_api_unittest.cc ('k') | ui/gl/gl_gl_api_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698