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

Side by Side Diff: ui/gl/gl_context_wgl.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_stub.cc ('k') | ui/gl/gl_implementation.h » ('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 // This file implements the GLContextWGL and PbufferGLContext classes. 5 // This file implements the GLContextWGL and PbufferGLContext classes.
6 6
7 #include "ui/gl/gl_context_wgl.h" 7 #include "ui/gl/gl_context_wgl.h"
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 if (!wglMakeCurrent(static_cast<HDC>(surface->GetHandle()), context_)) { 97 if (!wglMakeCurrent(static_cast<HDC>(surface->GetHandle()), context_)) {
98 LOG(ERROR) << "Unable to make gl context current."; 98 LOG(ERROR) << "Unable to make gl context current.";
99 return false; 99 return false;
100 } 100 }
101 101
102 // Set this as soon as the context is current, since we might call into GL. 102 // Set this as soon as the context is current, since we might call into GL.
103 SetRealGLApi(); 103 SetRealGLApi();
104 104
105 SetCurrent(surface); 105 SetCurrent(surface);
106 if (!InitializeDynamicBindings()) { 106 InitializeDynamicBindings();
107 return false;
108 }
109 107
110 if (!surface->OnMakeCurrent(this)) { 108 if (!surface->OnMakeCurrent(this)) {
111 LOG(ERROR) << "Could not make current."; 109 LOG(ERROR) << "Could not make current.";
112 return false; 110 return false;
113 } 111 }
114 112
115 release_current.Cancel(); 113 release_current.Cancel();
116 return true; 114 return true;
117 } 115 }
118 116
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 return GLContext::GetExtensions() + " " + extensions; 168 return GLContext::GetExtensions() + " " + extensions;
171 169
172 return GLContext::GetExtensions(); 170 return GLContext::GetExtensions();
173 } 171 }
174 172
175 GLContextWGL::~GLContextWGL() { 173 GLContextWGL::~GLContextWGL() {
176 Destroy(); 174 Destroy();
177 } 175 }
178 176
179 } // namespace gl 177 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_context_stub.cc ('k') | ui/gl/gl_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698