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

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

Issue 1354483004: Re-land: ui: Add GLImage unit test framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 static bool initialized = false; 209 bool initialized = InitializeDynamicGLBindings(GetGLImplementation(), this);
210 if (initialized)
211 return initialized;
212 initialized = InitializeDynamicGLBindings(GetGLImplementation(), this);
213 if (!initialized) 210 if (!initialized)
214 LOG(ERROR) << "Could not initialize dynamic bindings."; 211 LOG(ERROR) << "Could not initialize dynamic bindings.";
215 return initialized; 212 return initialized;
216 } 213 }
217 214
218 void GLContext::SetupForVirtualization() { 215 void GLContext::SetupForVirtualization() {
219 if (!virtual_gl_api_) { 216 if (!virtual_gl_api_) {
220 virtual_gl_api_.reset(new VirtualGLApi()); 217 virtual_gl_api_.reset(new VirtualGLApi());
221 virtual_gl_api_->Initialize(&g_driver_gl, this); 218 virtual_gl_api_->Initialize(&g_driver_gl, this);
222 } 219 }
(...skipping 27 matching lines...) Expand all
250 } 247 }
251 248
252 GLContextReal::~GLContextReal() {} 249 GLContextReal::~GLContextReal() {}
253 250
254 void GLContextReal::SetCurrent(GLSurface* surface) { 251 void GLContextReal::SetCurrent(GLSurface* surface) {
255 GLContext::SetCurrent(surface); 252 GLContext::SetCurrent(surface);
256 current_real_context_.Pointer()->Set(surface ? this : nullptr); 253 current_real_context_.Pointer()->Set(surface ? this : nullptr);
257 } 254 }
258 255
259 } // namespace gfx 256 } // 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