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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 return true; | 112 return true; |
113 } | 113 } |
114 | 114 |
115 void ContextProviderCommandBuffer::DetachFromThread() { | 115 void ContextProviderCommandBuffer::DetachFromThread() { |
116 context_thread_checker_.DetachFromThread(); | 116 context_thread_checker_.DetachFromThread(); |
117 } | 117 } |
118 | 118 |
119 gpu::gles2::GLES2Interface* ContextProviderCommandBuffer::ContextGL() { | 119 gpu::gles2::GLES2Interface* ContextProviderCommandBuffer::ContextGL() { |
120 DCHECK(lost_context_callback_proxy_); // Is bound to thread. | 120 DCHECK(lost_context_callback_proxy_); // Is bound to thread. |
121 | 121 |
122 return WebContext3D()->GetImplementation(); | 122 return WebContext3DNoChecks()->GetImplementation(); |
123 } | 123 } |
124 | 124 |
125 gpu::ContextSupport* ContextProviderCommandBuffer::ContextSupport() { | 125 gpu::ContextSupport* ContextProviderCommandBuffer::ContextSupport() { |
126 return WebContext3D()->GetContextSupport(); | 126 return WebContext3D()->GetContextSupport(); |
127 } | 127 } |
128 | 128 |
129 class GrContext* ContextProviderCommandBuffer::GrContext() { | 129 class GrContext* ContextProviderCommandBuffer::GrContext() { |
130 DCHECK(lost_context_callback_proxy_); // Is bound to thread. | 130 DCHECK(lost_context_callback_proxy_); // Is bound to thread. |
131 DCHECK(context_thread_checker_.CalledOnValidThread()); | 131 DCHECK(context_thread_checker_.CalledOnValidThread()); |
132 | 132 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 void ContextProviderCommandBuffer::SetLostContextCallback( | 198 void ContextProviderCommandBuffer::SetLostContextCallback( |
199 const LostContextCallback& lost_context_callback) { | 199 const LostContextCallback& lost_context_callback) { |
200 DCHECK(context_thread_checker_.CalledOnValidThread()); | 200 DCHECK(context_thread_checker_.CalledOnValidThread()); |
201 DCHECK(lost_context_callback_.is_null() || | 201 DCHECK(lost_context_callback_.is_null() || |
202 lost_context_callback.is_null()); | 202 lost_context_callback.is_null()); |
203 lost_context_callback_ = lost_context_callback; | 203 lost_context_callback_ = lost_context_callback; |
204 } | 204 } |
205 | 205 |
206 } // namespace content | 206 } // namespace content |
OLD | NEW |