OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "content/common/gpu/client/command_buffer_proxy_impl.h" | 16 #include "content/common/gpu/client/command_buffer_proxy_impl.h" |
| 17 #include "gpu/blink/webgraphicscontext3d_impl.h" |
17 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 18 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
18 #include "third_party/WebKit/public/platform/WebString.h" | 19 #include "third_party/WebKit/public/platform/WebString.h" |
19 #include "ui/gfx/native_widget_types.h" | 20 #include "ui/gfx/native_widget_types.h" |
20 #include "ui/gl/gpu_preference.h" | 21 #include "ui/gl/gpu_preference.h" |
21 #include "url/gurl.h" | 22 #include "url/gurl.h" |
22 #include "webkit/common/gpu/webgraphicscontext3d_impl.h" | |
23 | 23 |
24 namespace gpu { | 24 namespace gpu { |
25 | 25 |
26 class ContextSupport; | 26 class ContextSupport; |
27 class TransferBuffer; | 27 class TransferBuffer; |
28 | 28 |
29 namespace gles2 { | 29 namespace gles2 { |
30 class GLES2CmdHelper; | 30 class GLES2CmdHelper; |
31 class GLES2Implementation; | 31 class GLES2Implementation; |
32 class GLES2Interface; | 32 class GLES2Interface; |
33 } | 33 } |
34 } | 34 } |
35 | 35 |
36 namespace content { | 36 namespace content { |
37 class GpuChannelHost; | 37 class GpuChannelHost; |
38 | 38 |
39 const size_t kDefaultCommandBufferSize = 1024 * 1024; | 39 const size_t kDefaultCommandBufferSize = 1024 * 1024; |
40 const size_t kDefaultStartTransferBufferSize = 1 * 1024 * 1024; | 40 const size_t kDefaultStartTransferBufferSize = 1 * 1024 * 1024; |
41 const size_t kDefaultMinTransferBufferSize = 1 * 256 * 1024; | 41 const size_t kDefaultMinTransferBufferSize = 1 * 256 * 1024; |
42 const size_t kDefaultMaxTransferBufferSize = 16 * 1024 * 1024; | 42 const size_t kDefaultMaxTransferBufferSize = 16 * 1024 * 1024; |
43 | 43 |
44 class WebGraphicsContext3DCommandBufferImpl | 44 class WebGraphicsContext3DCommandBufferImpl |
45 : public webkit::gpu::WebGraphicsContext3DImpl { | 45 : public gpu_blink::WebGraphicsContext3DImpl { |
46 public: | 46 public: |
47 enum MappedMemoryReclaimLimit { | 47 enum MappedMemoryReclaimLimit { |
48 kNoLimit = 0, | 48 kNoLimit = 0, |
49 }; | 49 }; |
50 | 50 |
51 struct CONTENT_EXPORT SharedMemoryLimits { | 51 struct CONTENT_EXPORT SharedMemoryLimits { |
52 SharedMemoryLimits(); | 52 SharedMemoryLimits(); |
53 | 53 |
54 size_t command_buffer_size; | 54 size_t command_buffer_size; |
55 size_t start_transfer_buffer_size; | 55 size_t start_transfer_buffer_size; |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 | 209 |
210 // Member variables should appear before the WeakPtrFactory, to ensure | 210 // Member variables should appear before the WeakPtrFactory, to ensure |
211 // that any WeakPtrs to Controller are invalidated before its members | 211 // that any WeakPtrs to Controller are invalidated before its members |
212 // variable's destructors are executed, rendering them invalid. | 212 // variable's destructors are executed, rendering them invalid. |
213 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_; | 213 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_; |
214 }; | 214 }; |
215 | 215 |
216 } // namespace content | 216 } // namespace content |
217 | 217 |
218 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 218 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
OLD | NEW |