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

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

Issue 135753006: cc: Delete ContextProvider::MakeGrContextCurrent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 DCHECK(context_thread_checker_.CalledOnValidThread()); 132 DCHECK(context_thread_checker_.CalledOnValidThread());
133 133
134 if (gr_context_) 134 if (gr_context_)
135 return gr_context_->get(); 135 return gr_context_->get();
136 136
137 gr_context_.reset( 137 gr_context_.reset(
138 new webkit::gpu::GrContextForWebGraphicsContext3D(context3d_.get())); 138 new webkit::gpu::GrContextForWebGraphicsContext3D(context3d_.get()));
139 return gr_context_->get(); 139 return gr_context_->get();
140 } 140 }
141 141
142 void ContextProviderCommandBuffer::MakeGrContextCurrent() {
143 DCHECK(lost_context_callback_proxy_); // Is bound to thread.
144 DCHECK(context_thread_checker_.CalledOnValidThread());
145 DCHECK(gr_context_);
146
147 context3d_->makeContextCurrent();
148 }
149
150 cc::ContextProvider::Capabilities 142 cc::ContextProvider::Capabilities
151 ContextProviderCommandBuffer::ContextCapabilities() { 143 ContextProviderCommandBuffer::ContextCapabilities() {
152 DCHECK(lost_context_callback_proxy_); // Is bound to thread. 144 DCHECK(lost_context_callback_proxy_); // Is bound to thread.
153 DCHECK(context_thread_checker_.CalledOnValidThread()); 145 DCHECK(context_thread_checker_.CalledOnValidThread());
154 146
155 return capabilities_; 147 return capabilities_;
156 } 148 }
157 149
158 bool ContextProviderCommandBuffer::IsContextLost() { 150 bool ContextProviderCommandBuffer::IsContextLost() {
159 DCHECK(lost_context_callback_proxy_); // Is bound to thread. 151 DCHECK(lost_context_callback_proxy_); // Is bound to thread.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 219
228 void ContextProviderCommandBuffer::SetMemoryPolicyChangedCallback( 220 void ContextProviderCommandBuffer::SetMemoryPolicyChangedCallback(
229 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { 221 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {
230 DCHECK(context_thread_checker_.CalledOnValidThread()); 222 DCHECK(context_thread_checker_.CalledOnValidThread());
231 DCHECK(memory_policy_changed_callback_.is_null() || 223 DCHECK(memory_policy_changed_callback_.is_null() ||
232 memory_policy_changed_callback.is_null()); 224 memory_policy_changed_callback.is_null());
233 memory_policy_changed_callback_ = memory_policy_changed_callback; 225 memory_policy_changed_callback_ = memory_policy_changed_callback;
234 } 226 }
235 227
236 } // namespace content 228 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698