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 CONTENT_BROWSER_ANDROID_IN_PROCESS_CONTEXT_PROVIDER_IN_PROCESS_H_ |
6 #define WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_ | 6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_CONTEXT_PROVIDER_IN_PROCESS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
13 #include "base/threading/thread_checker.h" | 13 #include "base/threading/thread_checker.h" |
14 #include "cc/blink/context_provider_web_context.h" | 14 #include "cc/blink/context_provider_web_context.h" |
15 #include "webkit/common/gpu/webkit_gpu_export.h" | |
16 | 15 |
17 namespace blink { class WebGraphicsContext3D; } | 16 namespace blink { class WebGraphicsContext3D; } |
18 | 17 |
19 namespace gpu_blink { | 18 namespace gpu_blink { |
20 class WebGraphicsContext3DInProcessCommandBufferImpl; | 19 class WebGraphicsContext3DInProcessCommandBufferImpl; |
21 } | 20 } |
22 | 21 |
23 namespace webkit { | 22 namespace content { |
24 namespace gpu { | 23 |
25 class GrContextForWebGraphicsContext3D; | 24 class GrContextForWebGraphicsContext3D; |
26 | 25 |
27 class WEBKIT_GPU_EXPORT ContextProviderInProcess | 26 class ContextProviderInProcess |
28 : NON_EXPORTED_BASE(public cc_blink::ContextProviderWebContext) { | 27 : NON_EXPORTED_BASE(public cc_blink::ContextProviderWebContext) { |
29 public: | 28 public: |
30 static scoped_refptr<ContextProviderInProcess> Create( | 29 static scoped_refptr<ContextProviderInProcess> Create( |
31 scoped_ptr<gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl> | 30 scoped_ptr<gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl> |
32 context3d, | 31 context3d, |
33 const std::string& debug_name); | 32 const std::string& debug_name); |
34 | 33 |
35 // Uses default attributes for creating an offscreen context. | 34 // Uses default attributes for creating an offscreen context. |
36 static scoped_refptr<ContextProviderInProcess> CreateOffscreen( | 35 static scoped_refptr<ContextProviderInProcess> CreateOffscreen( |
37 bool lose_context_when_out_of_memory); | 36 bool lose_context_when_out_of_memory); |
(...skipping 45 matching lines...) Loading... |
83 base::Lock context_lock_; | 82 base::Lock context_lock_; |
84 std::string debug_name_; | 83 std::string debug_name_; |
85 class LostContextCallbackProxy; | 84 class LostContextCallbackProxy; |
86 scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_; | 85 scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_; |
87 | 86 |
88 cc::ContextProvider::Capabilities capabilities_; | 87 cc::ContextProvider::Capabilities capabilities_; |
89 | 88 |
90 DISALLOW_COPY_AND_ASSIGN(ContextProviderInProcess); | 89 DISALLOW_COPY_AND_ASSIGN(ContextProviderInProcess); |
91 }; | 90 }; |
92 | 91 |
93 } // namespace gpu | 92 } // namespace content |
94 } // namespace webkit | |
95 | 93 |
96 #endif // WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_ | 94 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_CONTEXT_PROVIDER_IN_PROCESS_H_ |
OLD | NEW |