| OLD | NEW |
| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 return context3d_->test_capabilities(); | 113 return context3d_->test_capabilities(); |
| 114 } | 114 } |
| 115 | 115 |
| 116 blink::WebGraphicsContext3D* TestContextProvider::Context3d() { | 116 blink::WebGraphicsContext3D* TestContextProvider::Context3d() { |
| 117 DCHECK(bound_); | 117 DCHECK(bound_); |
| 118 DCHECK(context_thread_checker_.CalledOnValidThread()); | 118 DCHECK(context_thread_checker_.CalledOnValidThread()); |
| 119 | 119 |
| 120 return context3d_.get(); | 120 return context3d_.get(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 gpu::gles2::GLES2Interface* TestContextProvider::ContextGL() { |
| 124 DCHECK(context3d_); |
| 125 DCHECK(bound_); |
| 126 DCHECK(context_thread_checker_.CalledOnValidThread()); |
| 127 |
| 128 return &context_gl_stub_; |
| 129 } |
| 130 |
| 123 gpu::ContextSupport* TestContextProvider::ContextSupport() { | 131 gpu::ContextSupport* TestContextProvider::ContextSupport() { |
| 124 DCHECK(bound_); | 132 DCHECK(bound_); |
| 125 DCHECK(context_thread_checker_.CalledOnValidThread()); | 133 DCHECK(context_thread_checker_.CalledOnValidThread()); |
| 126 | 134 |
| 127 return &support_; | 135 return &support_; |
| 128 } | 136 } |
| 129 | 137 |
| 130 class GrContext* TestContextProvider::GrContext() { | 138 class GrContext* TestContextProvider::GrContext() { |
| 131 DCHECK(bound_); | 139 DCHECK(bound_); |
| 132 DCHECK(context_thread_checker_.CalledOnValidThread()); | 140 DCHECK(context_thread_checker_.CalledOnValidThread()); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 DCHECK(memory_policy_changed_callback_.is_null() || cb.is_null()); | 223 DCHECK(memory_policy_changed_callback_.is_null() || cb.is_null()); |
| 216 memory_policy_changed_callback_ = cb; | 224 memory_policy_changed_callback_ = cb; |
| 217 } | 225 } |
| 218 | 226 |
| 219 void TestContextProvider::SetMaxTransferBufferUsageBytes( | 227 void TestContextProvider::SetMaxTransferBufferUsageBytes( |
| 220 size_t max_transfer_buffer_usage_bytes) { | 228 size_t max_transfer_buffer_usage_bytes) { |
| 221 context3d_->SetMaxTransferBufferUsageBytes(max_transfer_buffer_usage_bytes); | 229 context3d_->SetMaxTransferBufferUsageBytes(max_transfer_buffer_usage_bytes); |
| 222 } | 230 } |
| 223 | 231 |
| 224 } // namespace cc | 232 } // namespace cc |
| OLD | NEW |