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

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

Issue 916723002: cc: Add threaded GPU rasterization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix SynchronousCompositor setup. Created 5 years, 10 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
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 bound_ = true; 63 bound_ = true;
64 64
65 context3d_->set_context_lost_callback( 65 context3d_->set_context_lost_callback(
66 base::Bind(&TestContextProvider::OnLostContext, 66 base::Bind(&TestContextProvider::OnLostContext,
67 base::Unretained(this))); 67 base::Unretained(this)));
68 68
69 return true; 69 return true;
70 } 70 }
71 71
72 void TestContextProvider::DetachFromThread() {
73 context_thread_checker_.DetachFromThread();
74 }
75
72 ContextProvider::Capabilities TestContextProvider::ContextCapabilities() { 76 ContextProvider::Capabilities TestContextProvider::ContextCapabilities() {
73 DCHECK(bound_); 77 DCHECK(bound_);
74 DCHECK(context_thread_checker_.CalledOnValidThread()); 78 DCHECK(context_thread_checker_.CalledOnValidThread());
75 79
76 return context3d_->test_capabilities(); 80 return context3d_->test_capabilities();
77 } 81 }
78 82
79 gpu::gles2::GLES2Interface* TestContextProvider::ContextGL() { 83 gpu::gles2::GLES2Interface* TestContextProvider::ContextGL() {
80 DCHECK(context3d_); 84 DCHECK(context3d_);
81 DCHECK(bound_); 85 DCHECK(bound_);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 DCHECK(memory_policy_changed_callback_.is_null() || cb.is_null()); 177 DCHECK(memory_policy_changed_callback_.is_null() || cb.is_null());
174 memory_policy_changed_callback_ = cb; 178 memory_policy_changed_callback_ = cb;
175 } 179 }
176 180
177 void TestContextProvider::SetMaxTransferBufferUsageBytes( 181 void TestContextProvider::SetMaxTransferBufferUsageBytes(
178 size_t max_transfer_buffer_usage_bytes) { 182 size_t max_transfer_buffer_usage_bytes) {
179 context3d_->SetMaxTransferBufferUsageBytes(max_transfer_buffer_usage_bytes); 183 context3d_->SetMaxTransferBufferUsageBytes(max_transfer_buffer_usage_bytes);
180 } 184 }
181 185
182 } // namespace cc 186 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698