| 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 WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_ | 5 #ifndef WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_ |
| 6 #define WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_ | 6 #define WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_ |
| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 ContextProviderInProcess( | 51 ContextProviderInProcess( |
| 52 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d, | 52 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d, |
| 53 const std::string& debug_name); | 53 const std::string& debug_name); |
| 54 virtual ~ContextProviderInProcess(); | 54 virtual ~ContextProviderInProcess(); |
| 55 | 55 |
| 56 void OnLostContext(); | 56 void OnLostContext(); |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 void InitializeCapabilities(); | 59 void InitializeCapabilities(); |
| 60 | 60 |
| 61 // Whether gpu_toplevel category is enabled. |
| 62 const unsigned char* gpu_trace_top_level_category_; |
| 63 |
| 61 base::ThreadChecker main_thread_checker_; | 64 base::ThreadChecker main_thread_checker_; |
| 62 base::ThreadChecker context_thread_checker_; | 65 base::ThreadChecker context_thread_checker_; |
| 63 | 66 |
| 64 scoped_ptr<webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl> | 67 scoped_ptr<webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl> |
| 65 context3d_; | 68 context3d_; |
| 66 scoped_ptr<webkit::gpu::GrContextForWebGraphicsContext3D> gr_context_; | 69 scoped_ptr<webkit::gpu::GrContextForWebGraphicsContext3D> gr_context_; |
| 67 | 70 |
| 68 LostContextCallback lost_context_callback_; | 71 LostContextCallback lost_context_callback_; |
| 69 | 72 |
| 70 base::Lock destroyed_lock_; | 73 base::Lock destroyed_lock_; |
| 71 bool destroyed_; | 74 bool destroyed_; |
| 72 | 75 |
| 73 std::string debug_name_; | 76 std::string debug_name_; |
| 74 class LostContextCallbackProxy; | 77 class LostContextCallbackProxy; |
| 75 scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_; | 78 scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_; |
| 76 | 79 |
| 77 cc::ContextProvider::Capabilities capabilities_; | 80 cc::ContextProvider::Capabilities capabilities_; |
| 78 | 81 |
| 79 DISALLOW_COPY_AND_ASSIGN(ContextProviderInProcess); | 82 DISALLOW_COPY_AND_ASSIGN(ContextProviderInProcess); |
| 80 }; | 83 }; |
| 81 | 84 |
| 82 } // namespace gpu | 85 } // namespace gpu |
| 83 } // namespace webkit | 86 } // namespace webkit |
| 84 | 87 |
| 85 #endif // WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_ | 88 #endif // WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_ |
| OLD | NEW |