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

Side by Side Diff: cc/test/test_context_provider.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/test/test_context_provider.h" 5 #include "cc/test/test_context_provider.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 blink::WebGraphicsContext3D* TestContextProvider::Context3d() { 119 blink::WebGraphicsContext3D* TestContextProvider::Context3d() {
120 DCHECK(context3d_); 120 DCHECK(context3d_);
121 DCHECK(bound_); 121 DCHECK(bound_);
122 DCHECK(context_thread_checker_.CalledOnValidThread()); 122 DCHECK(context_thread_checker_.CalledOnValidThread());
123 123
124 return context3d_.get(); 124 return context3d_.get();
125 } 125 }
126 126
127 gpu::gles2::GLES2Interface* TestContextProvider::ContextGL() {
128 DCHECK(context3d_);
129 DCHECK(bound_);
130 DCHECK(context_thread_checker_.CalledOnValidThread());
131
132 return &context_gl_stub_;
133 }
134
127 gpu::ContextSupport* TestContextProvider::ContextSupport() { 135 gpu::ContextSupport* TestContextProvider::ContextSupport() {
128 DCHECK(context3d_); 136 DCHECK(context3d_);
129 DCHECK(bound_); 137 DCHECK(bound_);
130 DCHECK(context_thread_checker_.CalledOnValidThread()); 138 DCHECK(context_thread_checker_.CalledOnValidThread());
131 139
132 return &support_; 140 return &support_;
133 } 141 }
134 142
135 class GrContext* TestContextProvider::GrContext() { 143 class GrContext* TestContextProvider::GrContext() {
136 DCHECK(context3d_); 144 DCHECK(context3d_);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 DCHECK(memory_policy_changed_callback_.is_null() || cb.is_null()); 234 DCHECK(memory_policy_changed_callback_.is_null() || cb.is_null());
227 memory_policy_changed_callback_ = cb; 235 memory_policy_changed_callback_ = cb;
228 } 236 }
229 237
230 void TestContextProvider::SetMaxTransferBufferUsageBytes( 238 void TestContextProvider::SetMaxTransferBufferUsageBytes(
231 size_t max_transfer_buffer_usage_bytes) { 239 size_t max_transfer_buffer_usage_bytes) {
232 context3d_->SetMaxTransferBufferUsageBytes(max_transfer_buffer_usage_bytes); 240 context3d_->SetMaxTransferBufferUsageBytes(max_transfer_buffer_usage_bytes);
233 } 241 }
234 242
235 } // namespace cc 243 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698