| 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 "content/browser/android/in_process/context_provider_in_process.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "cc/output/managed_memory_policy.h" | 10 #include "cc/output/managed_memory_policy.h" |
| 11 #include "content/common/gpu/client/grcontext_for_webgraphicscontext3d.h" |
| 11 #include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h" | 12 #include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h" |
| 12 #include "gpu/command_buffer/client/gles2_implementation.h" | 13 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 13 #include "webkit/common/gpu/grcontext_for_webgraphicscontext3d.h" | |
| 14 | 14 |
| 15 using gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl; | 15 using gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl; |
| 16 | 16 |
| 17 namespace webkit { | 17 namespace content { |
| 18 namespace gpu { | |
| 19 | 18 |
| 20 class ContextProviderInProcess::LostContextCallbackProxy | 19 class ContextProviderInProcess::LostContextCallbackProxy |
| 21 : public blink::WebGraphicsContext3D::WebGraphicsContextLostCallback { | 20 : public blink::WebGraphicsContext3D::WebGraphicsContextLostCallback { |
| 22 public: | 21 public: |
| 23 explicit LostContextCallbackProxy(ContextProviderInProcess* provider) | 22 explicit LostContextCallbackProxy(ContextProviderInProcess* provider) |
| 24 : provider_(provider) { | 23 : provider_(provider) { |
| 25 provider_->context3d_->setContextLostCallback(this); | 24 provider_->context3d_->setContextLostCallback(this); |
| 26 } | 25 } |
| 27 | 26 |
| 28 virtual ~LostContextCallbackProxy() { | 27 virtual ~LostContextCallbackProxy() { |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 DCHECK(lost_context_callback_.is_null() || | 216 DCHECK(lost_context_callback_.is_null() || |
| 218 lost_context_callback.is_null()); | 217 lost_context_callback.is_null()); |
| 219 lost_context_callback_ = lost_context_callback; | 218 lost_context_callback_ = lost_context_callback; |
| 220 } | 219 } |
| 221 | 220 |
| 222 void ContextProviderInProcess::SetMemoryPolicyChangedCallback( | 221 void ContextProviderInProcess::SetMemoryPolicyChangedCallback( |
| 223 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { | 222 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { |
| 224 // There's no memory manager for the in-process implementation. | 223 // There's no memory manager for the in-process implementation. |
| 225 } | 224 } |
| 226 | 225 |
| 227 } // namespace gpu | 226 } // namespace content |
| 228 } // namespace webkit | |
| OLD | NEW |