OLD | NEW |
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 webkit::gpu::GrContextForWebGraphicsContext3D* gr_context ALLOW_UNUSED = | 76 webkit::gpu::GrContextForWebGraphicsContext3D* gr_context ALLOW_UNUSED = |
77 gr_context_.release(); | 77 gr_context_.release(); |
78 } | 78 } |
79 } | 79 } |
80 | 80 |
81 | 81 |
82 CommandBufferProxyImpl* ContextProviderCommandBuffer::GetCommandBufferProxy() { | 82 CommandBufferProxyImpl* ContextProviderCommandBuffer::GetCommandBufferProxy() { |
83 return context3d_->GetCommandBufferProxy(); | 83 return context3d_->GetCommandBufferProxy(); |
84 } | 84 } |
85 | 85 |
86 int ContextProviderCommandBuffer::GetGPUProcessID() { | |
87 return context3d_->GetGPUProcessID(); | |
88 } | |
89 | |
90 WebGraphicsContext3DCommandBufferImpl* | 86 WebGraphicsContext3DCommandBufferImpl* |
91 ContextProviderCommandBuffer::WebContext3D() { | 87 ContextProviderCommandBuffer::WebContext3D() { |
92 DCHECK(context3d_); | 88 DCHECK(context3d_); |
93 DCHECK(lost_context_callback_proxy_); // Is bound to thread. | 89 DCHECK(lost_context_callback_proxy_); // Is bound to thread. |
94 DCHECK(context_thread_checker_.CalledOnValidThread()); | 90 DCHECK(context_thread_checker_.CalledOnValidThread()); |
95 | 91 |
96 return context3d_.get(); | 92 return context3d_.get(); |
97 } | 93 } |
98 | 94 |
99 bool ContextProviderCommandBuffer::BindToCurrentThread() { | 95 bool ContextProviderCommandBuffer::BindToCurrentThread() { |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 231 |
236 void ContextProviderCommandBuffer::SetMemoryPolicyChangedCallback( | 232 void ContextProviderCommandBuffer::SetMemoryPolicyChangedCallback( |
237 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { | 233 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { |
238 DCHECK(context_thread_checker_.CalledOnValidThread()); | 234 DCHECK(context_thread_checker_.CalledOnValidThread()); |
239 DCHECK(memory_policy_changed_callback_.is_null() || | 235 DCHECK(memory_policy_changed_callback_.is_null() || |
240 memory_policy_changed_callback.is_null()); | 236 memory_policy_changed_callback.is_null()); |
241 memory_policy_changed_callback_ = memory_policy_changed_callback; | 237 memory_policy_changed_callback_ = memory_policy_changed_callback; |
242 } | 238 } |
243 | 239 |
244 } // namespace content | 240 } // namespace content |
OLD | NEW |