| 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 #ifndef CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER |
| 6 #define CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER | 6 #define CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // Implementation of cc::ContextProvider that provides a | 25 // Implementation of cc::ContextProvider that provides a |
| 26 // WebGraphicsContext3DCommandBufferImpl context and a GrContext. | 26 // WebGraphicsContext3DCommandBufferImpl context and a GrContext. |
| 27 class CONTENT_EXPORT ContextProviderCommandBuffer | 27 class CONTENT_EXPORT ContextProviderCommandBuffer |
| 28 : NON_EXPORTED_BASE(public webkit::gpu::ContextProviderWebContext) { | 28 : NON_EXPORTED_BASE(public webkit::gpu::ContextProviderWebContext) { |
| 29 public: | 29 public: |
| 30 static scoped_refptr<ContextProviderCommandBuffer> Create( | 30 static scoped_refptr<ContextProviderCommandBuffer> Create( |
| 31 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context3d, | 31 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context3d, |
| 32 const std::string& debug_name); | 32 const std::string& debug_name); |
| 33 | 33 |
| 34 CommandBufferProxyImpl* GetCommandBufferProxy(); | 34 CommandBufferProxyImpl* GetCommandBufferProxy(); |
| 35 int GetGPUProcessID(); | |
| 36 | 35 |
| 37 void set_leak_on_destroy() { | 36 void set_leak_on_destroy() { |
| 38 base::AutoLock lock(main_thread_lock_); | 37 base::AutoLock lock(main_thread_lock_); |
| 39 leak_on_destroy_ = true; | 38 leak_on_destroy_ = true; |
| 40 } | 39 } |
| 41 | 40 |
| 42 // ContextProviderWebContext implementation. | 41 // ContextProviderWebContext implementation. |
| 43 virtual WebGraphicsContext3DCommandBufferImpl* WebContext3D() OVERRIDE; | 42 virtual WebGraphicsContext3DCommandBufferImpl* WebContext3D() OVERRIDE; |
| 44 | 43 |
| 45 // cc::ContextProvider implementation. | 44 // cc::ContextProvider implementation. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 bool leak_on_destroy_; | 86 bool leak_on_destroy_; |
| 88 bool destroyed_; | 87 bool destroyed_; |
| 89 | 88 |
| 90 class LostContextCallbackProxy; | 89 class LostContextCallbackProxy; |
| 91 scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_; | 90 scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_; |
| 92 }; | 91 }; |
| 93 | 92 |
| 94 } // namespace content | 93 } // namespace content |
| 95 | 94 |
| 96 #endif // CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER | 95 #endif // CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER |
| OLD | NEW |