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

Side by Side Diff: content/common/gpu/client/context_provider_command_buffer.cc

Issue 54463007: Expose GLES2Interface to cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/common/gpu/client/context_provider_command_buffer.h" 5 #include "content/common/gpu/client/context_provider_command_buffer.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } 129 }
130 130
131 WebGraphicsContext3DCommandBufferImpl* 131 WebGraphicsContext3DCommandBufferImpl*
132 ContextProviderCommandBuffer::Context3d() { 132 ContextProviderCommandBuffer::Context3d() {
133 DCHECK(lost_context_callback_proxy_); // Is bound to thread. 133 DCHECK(lost_context_callback_proxy_); // Is bound to thread.
134 DCHECK(context_thread_checker_.CalledOnValidThread()); 134 DCHECK(context_thread_checker_.CalledOnValidThread());
135 135
136 return context3d_.get(); 136 return context3d_.get();
137 } 137 }
138 138
139 gpu::gles2::GLES2Interface* ContextProviderCommandBuffer::ContextGL() {
140 DCHECK(context3d_);
141 DCHECK(lost_context_callback_proxy_); // Is bound to thread.
142 DCHECK(context_thread_checker_.CalledOnValidThread());
143
144 return context3d_->GetImplementation();
145 }
146
139 gpu::ContextSupport* ContextProviderCommandBuffer::ContextSupport() { 147 gpu::ContextSupport* ContextProviderCommandBuffer::ContextSupport() {
140 return context3d_->GetContextSupport(); 148 return context3d_->GetContextSupport();
141 } 149 }
142 150
143 class GrContext* ContextProviderCommandBuffer::GrContext() { 151 class GrContext* ContextProviderCommandBuffer::GrContext() {
144 DCHECK(lost_context_callback_proxy_); // Is bound to thread. 152 DCHECK(lost_context_callback_proxy_); // Is bound to thread.
145 DCHECK(context_thread_checker_.CalledOnValidThread()); 153 DCHECK(context_thread_checker_.CalledOnValidThread());
146 154
147 if (gr_context_) 155 if (gr_context_)
148 return gr_context_->get(); 156 return gr_context_->get();
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 311
304 void ContextProviderCommandBuffer::SetMemoryPolicyChangedCallback( 312 void ContextProviderCommandBuffer::SetMemoryPolicyChangedCallback(
305 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { 313 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {
306 DCHECK(context_thread_checker_.CalledOnValidThread()); 314 DCHECK(context_thread_checker_.CalledOnValidThread());
307 DCHECK(memory_policy_changed_callback_.is_null() || 315 DCHECK(memory_policy_changed_callback_.is_null() ||
308 memory_policy_changed_callback.is_null()); 316 memory_policy_changed_callback.is_null());
309 memory_policy_changed_callback_ = memory_policy_changed_callback; 317 memory_policy_changed_callback_ = memory_policy_changed_callback;
310 } 318 }
311 319
312 } // namespace content 320 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/context_provider_command_buffer.h ('k') | gpu/command_buffer/client/gles2_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698