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

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

Issue 2670213005: Hook ANGLE_request_extension up to the passthrough cmd decoder. (Closed)
Patch Set: Address zmo@'s comments Created 3 years, 9 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.h ('k') | ui/gl/gl_mock_autogen_gl.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 #include "ui/gl/gl_context.h" 5 #include "ui/gl/gl_context.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 current_gl_->Driver = driver_gl_.get(); 131 current_gl_->Driver = driver_gl_.get();
132 current_gl_->Api = final_api; 132 current_gl_->Api = final_api;
133 current_gl_->Version = version_info_.get(); 133 current_gl_->Version = version_info_.get();
134 134
135 static_bindings_initialized_ = true; 135 static_bindings_initialized_ = true;
136 } 136 }
137 137
138 return current_gl_.get(); 138 return current_gl_.get();
139 } 139 }
140 140
141 void GLContext::ReinitializeDynamicBindings() {
142 DCHECK(IsCurrent(nullptr));
143 dynamic_bindings_initialized_ = false;
144 InitializeDynamicBindings();
145 }
146
141 bool GLContext::HasExtension(const char* name) { 147 bool GLContext::HasExtension(const char* name) {
142 std::string extensions = GetExtensions(); 148 std::string extensions = GetExtensions();
143 extensions += " "; 149 extensions += " ";
144 150
145 std::string delimited_name(name); 151 std::string delimited_name(name);
146 delimited_name += " "; 152 delimited_name += " ";
147 153
148 return extensions.find(delimited_name) != std::string::npos; 154 return extensions.find(delimited_name) != std::string::npos;
149 } 155 }
150 156
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 339
334 scoped_refptr<GLContext> InitializeGLContext(scoped_refptr<GLContext> context, 340 scoped_refptr<GLContext> InitializeGLContext(scoped_refptr<GLContext> context,
335 GLSurface* compatible_surface, 341 GLSurface* compatible_surface,
336 const GLContextAttribs& attribs) { 342 const GLContextAttribs& attribs) {
337 if (!context->Initialize(compatible_surface, attribs)) 343 if (!context->Initialize(compatible_surface, attribs))
338 return nullptr; 344 return nullptr;
339 return context; 345 return context;
340 } 346 }
341 347
342 } // namespace gl 348 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_context.h ('k') | ui/gl/gl_mock_autogen_gl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698