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

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

Issue 1937313003: Hide WebGraphicsContext3DCommandBufferImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: construct: . Created 4 years, 7 months 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
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 public: 47 public:
48 enum MappedMemoryReclaimLimit { 48 enum MappedMemoryReclaimLimit {
49 kNoLimit = 0, 49 kNoLimit = 0,
50 }; 50 };
51 51
52 // If surface_handle is not kNullSurfaceHandle, this creates a 52 // If surface_handle is not kNullSurfaceHandle, this creates a
53 // CommandBufferProxy that renders directly to a view. The view and 53 // CommandBufferProxy that renders directly to a view. The view and
54 // the associated window must not be destroyed until the returned 54 // the associated window must not be destroyed until the returned
55 // CommandBufferProxy has been destroyed, otherwise the GPU process might 55 // CommandBufferProxy has been destroyed, otherwise the GPU process might
56 // attempt to render to an invalid window handle. 56 // attempt to render to an invalid window handle.
57 CONTENT_EXPORT WebGraphicsContext3DCommandBufferImpl( 57 CONTENT_EXPORT WebGraphicsContext3DCommandBufferImpl();
58 gpu::SurfaceHandle surface_handle,
59 const GURL& active_url,
60 scoped_refptr<gpu::GpuChannelHost> host,
61 gfx::GpuPreference gpu_preference,
62 bool automatic_flushes);
63
64 CONTENT_EXPORT ~WebGraphicsContext3DCommandBufferImpl(); 58 CONTENT_EXPORT ~WebGraphicsContext3DCommandBufferImpl();
65 59
66 gpu::CommandBufferProxyImpl* GetCommandBufferProxy() { 60 gpu::CommandBufferProxyImpl* GetCommandBufferProxy() {
67 return command_buffer_.get(); 61 return command_buffer_.get();
68 } 62 }
69 63
70 gpu::gles2::GLES2Implementation* GetImplementation() { 64 gpu::gles2::GLES2Implementation* GetImplementation() {
71 return real_gl_.get(); 65 return real_gl_.get();
72 } 66 }
73 67
74 CONTENT_EXPORT bool InitializeOnCurrentThread( 68 CONTENT_EXPORT bool InitializeOnCurrentThread(
69 gpu::SurfaceHandle surface_handle,
70 const GURL& active_url,
71 gpu::GpuChannelHost* host,
72 gfx::GpuPreference gpu_preference,
73 bool automatic_flushes,
75 const gpu::SharedMemoryLimits& memory_limits, 74 const gpu::SharedMemoryLimits& memory_limits,
76 gpu::CommandBufferProxyImpl* shared_command_buffer, 75 gpu::CommandBufferProxyImpl* shared_command_buffer,
77 scoped_refptr<gpu::gles2::ShareGroup> share_group, 76 scoped_refptr<gpu::gles2::ShareGroup> share_group,
78 const gpu::gles2::ContextCreationAttribHelper& attributes, 77 const gpu::gles2::ContextCreationAttribHelper& attributes,
79 command_buffer_metrics::ContextType context_type); 78 command_buffer_metrics::ContextType context_type);
80 79
81 private: 80 private:
82 bool MaybeInitializeGL( 81 bool MaybeInitializeGL(
82 gpu::SurfaceHandle surface_handle,
83 const GURL& active_url,
84 gpu::GpuChannelHost* host,
85 gfx::GpuPreference gpu_preference,
86 bool automatic_flushes,
83 const gpu::SharedMemoryLimits& memory_limits, 87 const gpu::SharedMemoryLimits& memory_limits,
84 gpu::CommandBufferProxyImpl* shared_command_buffer, 88 gpu::CommandBufferProxyImpl* shared_command_buffer,
85 scoped_refptr<gpu::gles2::ShareGroup> share_group, 89 scoped_refptr<gpu::gles2::ShareGroup> share_group,
86 const gpu::gles2::ContextCreationAttribHelper& attributes, 90 const gpu::gles2::ContextCreationAttribHelper& attributes,
87 command_buffer_metrics::ContextType context_type); 91 command_buffer_metrics::ContextType context_type);
88 92
89 bool automatic_flushes_;
90 gpu::SurfaceHandle surface_handle_;
91 GURL active_url_;
92 gfx::GpuPreference gpu_preference_;
93
94 scoped_refptr<gpu::GpuChannelHost> host_;
95 std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_; 93 std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_;
96 std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; 94 std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
97 std::unique_ptr<gpu::TransferBuffer> transfer_buffer_; 95 std::unique_ptr<gpu::TransferBuffer> transfer_buffer_;
98 std::unique_ptr<gpu::gles2::GLES2Implementation> real_gl_; 96 std::unique_ptr<gpu::gles2::GLES2Implementation> real_gl_;
99 std::unique_ptr<gpu::gles2::GLES2Interface> trace_gl_; 97 std::unique_ptr<gpu::gles2::GLES2Interface> trace_gl_;
100 }; 98 };
101 99
102 } // namespace content 100 } // namespace content
103 101
104 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 102 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698