Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h

Issue 802113002: Revert "Revert of Extract WebGraphicsContext3DImpl from webkit/common/gpu. (patchset #12 id:220001 … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/BUILD.gn ('k') | content/content_common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « content/common/BUILD.gn ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698