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_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
15 #include "base/threading/thread_checker.h" | 15 #include "base/threading/thread_checker.h" |
16 #include "cc/output/context_provider.h" | 16 #include "cc/output/context_provider.h" |
17 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
18 #include "content/common/gpu/client/command_buffer_metrics.h" | 18 #include "content/common/gpu/client/command_buffer_metrics.h" |
19 #include "gpu/command_buffer/client/shared_memory_limits.h" | 19 #include "gpu/command_buffer/client/shared_memory_limits.h" |
20 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 20 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
21 #include "gpu/ipc/common/surface_handle.h" | 21 #include "gpu/ipc/common/surface_handle.h" |
22 #include "ui/gl/gpu_preference.h" | 22 #include "ui/gl/gpu_preference.h" |
23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
24 | 24 |
25 namespace gpu { | 25 namespace gpu { |
26 class CommandBufferProxyImpl; | 26 class CommandBufferProxyImpl; |
27 class GpuChannelHost; | 27 class GpuChannelHost; |
| 28 class TransferBuffer; |
28 namespace gles2 { | 29 namespace gles2 { |
| 30 class GLES2CmdHelper; |
| 31 class GLES2Implementation; |
29 class GLES2TraceImplementation; | 32 class GLES2TraceImplementation; |
30 } | 33 } |
31 } | 34 } |
32 | 35 |
33 namespace skia_bindings { | 36 namespace skia_bindings { |
34 class GrContextForGLES2Interface; | 37 class GrContextForGLES2Interface; |
35 } | 38 } |
36 | 39 |
37 namespace content { | 40 namespace content { |
38 class WebGraphicsContext3DCommandBufferImpl; | 41 class WebGraphicsContext3DCommandBufferImpl; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 90 |
88 private: | 91 private: |
89 friend class base::RefCountedThreadSafe<SharedProviders>; | 92 friend class base::RefCountedThreadSafe<SharedProviders>; |
90 ~SharedProviders(); | 93 ~SharedProviders(); |
91 }; | 94 }; |
92 | 95 |
93 base::ThreadChecker main_thread_checker_; | 96 base::ThreadChecker main_thread_checker_; |
94 base::ThreadChecker context_thread_checker_; | 97 base::ThreadChecker context_thread_checker_; |
95 | 98 |
96 bool bind_succeeded_ = false; | 99 bool bind_succeeded_ = false; |
| 100 bool bind_failed_ = false; |
97 | 101 |
98 gpu::SurfaceHandle surface_handle_; | 102 gpu::SurfaceHandle surface_handle_; |
99 GURL active_url_; | 103 GURL active_url_; |
100 gfx::GpuPreference gpu_preference_; | 104 gfx::GpuPreference gpu_preference_; |
101 bool automatic_flushes_; | 105 bool automatic_flushes_; |
102 gpu::SharedMemoryLimits memory_limits_; | 106 gpu::SharedMemoryLimits memory_limits_; |
103 gpu::gles2::ContextCreationAttribHelper attributes_; | 107 gpu::gles2::ContextCreationAttribHelper attributes_; |
104 command_buffer_metrics::ContextType context_type_; | 108 command_buffer_metrics::ContextType context_type_; |
105 | 109 |
106 scoped_refptr<SharedProviders> shared_providers_; | 110 scoped_refptr<SharedProviders> shared_providers_; |
107 scoped_refptr<gpu::GpuChannelHost> channel_; | 111 scoped_refptr<gpu::GpuChannelHost> channel_; |
108 | 112 |
109 base::Lock context_lock_; // Referenced by context3d_. | 113 base::Lock context_lock_; // Referenced by command_buffer_. |
110 std::unique_ptr<WebGraphicsContext3DCommandBufferImpl> context3d_; | 114 std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_; |
| 115 std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; |
| 116 std::unique_ptr<gpu::TransferBuffer> transfer_buffer_; |
| 117 std::unique_ptr<gpu::gles2::GLES2Implementation> gles2_impl_; |
111 std::unique_ptr<gpu::gles2::GLES2TraceImplementation> trace_impl_; | 118 std::unique_ptr<gpu::gles2::GLES2TraceImplementation> trace_impl_; |
112 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; | 119 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; |
113 | 120 |
114 LostContextCallback lost_context_callback_; | 121 LostContextCallback lost_context_callback_; |
115 }; | 122 }; |
116 | 123 |
117 } // namespace content | 124 } // namespace content |
118 | 125 |
119 #endif // CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ | 126 #endif // CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ |
OLD | NEW |