| 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 "webkit/common/gpu/context_provider_in_process.h" | 5 #include "webkit/common/gpu/context_provider_in_process.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 return caps; | 144 return caps; |
| 145 } | 145 } |
| 146 | 146 |
| 147 blink::WebGraphicsContext3D* ContextProviderInProcess::Context3d() { | 147 blink::WebGraphicsContext3D* ContextProviderInProcess::Context3d() { |
| 148 DCHECK(lost_context_callback_proxy_); // Is bound to thread. | 148 DCHECK(lost_context_callback_proxy_); // Is bound to thread. |
| 149 DCHECK(context_thread_checker_.CalledOnValidThread()); | 149 DCHECK(context_thread_checker_.CalledOnValidThread()); |
| 150 | 150 |
| 151 return context3d_.get(); | 151 return context3d_.get(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 ::gpu::gles2::GLES2Interface* ContextProviderInProcess::ContextGL() { |
| 155 DCHECK(context3d_); |
| 156 DCHECK(lost_context_callback_proxy_); // Is bound to thread. |
| 157 DCHECK(context_thread_checker_.CalledOnValidThread()); |
| 158 |
| 159 return context3d_->GetGLInterface(); |
| 160 } |
| 161 |
| 154 ::gpu::ContextSupport* ContextProviderInProcess::ContextSupport() { | 162 ::gpu::ContextSupport* ContextProviderInProcess::ContextSupport() { |
| 155 DCHECK(lost_context_callback_proxy_); // Is bound to thread. | 163 DCHECK(lost_context_callback_proxy_); // Is bound to thread. |
| 156 DCHECK(context_thread_checker_.CalledOnValidThread()); | 164 DCHECK(context_thread_checker_.CalledOnValidThread()); |
| 157 | 165 |
| 158 return context3d_->GetContextSupport(); | 166 return context3d_->GetContextSupport(); |
| 159 } | 167 } |
| 160 | 168 |
| 161 class GrContext* ContextProviderInProcess::GrContext() { | 169 class GrContext* ContextProviderInProcess::GrContext() { |
| 162 DCHECK(lost_context_callback_proxy_); // Is bound to thread. | 170 DCHECK(lost_context_callback_proxy_); // Is bound to thread. |
| 163 DCHECK(context_thread_checker_.CalledOnValidThread()); | 171 DCHECK(context_thread_checker_.CalledOnValidThread()); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 swap_buffers_complete_callback_ = swap_buffers_complete_callback; | 234 swap_buffers_complete_callback_ = swap_buffers_complete_callback; |
| 227 } | 235 } |
| 228 | 236 |
| 229 void ContextProviderInProcess::SetMemoryPolicyChangedCallback( | 237 void ContextProviderInProcess::SetMemoryPolicyChangedCallback( |
| 230 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { | 238 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { |
| 231 // There's no memory manager for the in-process implementation. | 239 // There's no memory manager for the in-process implementation. |
| 232 } | 240 } |
| 233 | 241 |
| 234 } // namespace gpu | 242 } // namespace gpu |
| 235 } // namespace webkit | 243 } // namespace webkit |
| OLD | NEW |