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

Side by Side Diff: cc/test/test_context_provider.cc

Issue 1900993002: Move SharedMemoryLimits out of WebGraphicsContext3DCommandBufferImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@limits
Patch Set: move-limits: types Created 4 years, 8 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 | « cc/test/test_context_provider.h ('k') | cc/test/test_in_process_context_provider.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 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 base::Bind(&TestContextProvider::OnLostContext, 79 base::Bind(&TestContextProvider::OnLostContext,
80 base::Unretained(this))); 80 base::Unretained(this)));
81 81
82 return true; 82 return true;
83 } 83 }
84 84
85 void TestContextProvider::DetachFromThread() { 85 void TestContextProvider::DetachFromThread() {
86 context_thread_checker_.DetachFromThread(); 86 context_thread_checker_.DetachFromThread();
87 } 87 }
88 88
89 ContextProvider::Capabilities TestContextProvider::ContextCapabilities() { 89 gpu::Capabilities TestContextProvider::ContextCapabilities() {
90 DCHECK(bound_); 90 DCHECK(bound_);
91 DCHECK(context_thread_checker_.CalledOnValidThread()); 91 DCHECK(context_thread_checker_.CalledOnValidThread());
92
93 return context3d_->test_capabilities(); 92 return context3d_->test_capabilities();
94 } 93 }
95 94
96 gpu::gles2::GLES2Interface* TestContextProvider::ContextGL() { 95 gpu::gles2::GLES2Interface* TestContextProvider::ContextGL() {
97 DCHECK(context3d_); 96 DCHECK(context3d_);
98 DCHECK(bound_); 97 DCHECK(bound_);
99 DCHECK(context_thread_checker_.CalledOnValidThread()); 98 DCHECK(context_thread_checker_.CalledOnValidThread());
100 99
101 return context_gl_.get(); 100 return context_gl_.get();
102 } 101 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 return context3d_.get(); 161 return context3d_.get();
163 } 162 }
164 163
165 void TestContextProvider::SetLostContextCallback( 164 void TestContextProvider::SetLostContextCallback(
166 const LostContextCallback& cb) { 165 const LostContextCallback& cb) {
167 DCHECK(context_thread_checker_.CalledOnValidThread()); 166 DCHECK(context_thread_checker_.CalledOnValidThread());
168 DCHECK(lost_context_callback_.is_null() || cb.is_null()); 167 DCHECK(lost_context_callback_.is_null() || cb.is_null());
169 lost_context_callback_ = cb; 168 lost_context_callback_ = cb;
170 } 169 }
171 170
172 void TestContextProvider::SetMaxTransferBufferUsageBytes(
173 size_t max_transfer_buffer_usage_bytes) {
174 context3d_->SetMaxTransferBufferUsageBytes(max_transfer_buffer_usage_bytes);
175 }
176
177 } // namespace cc 171 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_context_provider.h ('k') | cc/test/test_in_process_context_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698