| 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 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 protected: | 69 protected: |
| 70 virtual ~WebGraphicsContext3DSwapBuffersClient() {} | 70 virtual ~WebGraphicsContext3DSwapBuffersClient() {} |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 class WebGraphicsContext3DErrorMessageCallback; | 73 class WebGraphicsContext3DErrorMessageCallback; |
| 74 | 74 |
| 75 class WebGraphicsContext3DCommandBufferImpl | 75 class WebGraphicsContext3DCommandBufferImpl |
| 76 : public WebKit::WebGraphicsContext3D, | 76 : public WebKit::WebGraphicsContext3D, |
| 77 public base::SupportsWeakPtr<WebGraphicsContext3DCommandBufferImpl> { | 77 public base::SupportsWeakPtr<WebGraphicsContext3DCommandBufferImpl> { |
| 78 public: | 78 public: |
| 79 enum MappedMemoryReclaimLimit { |
| 80 kNoLimit = 0, |
| 81 }; |
| 82 |
| 79 WebGraphicsContext3DCommandBufferImpl( | 83 WebGraphicsContext3DCommandBufferImpl( |
| 80 int surface_id, | 84 int surface_id, |
| 81 const GURL& active_url, | 85 const GURL& active_url, |
| 82 GpuChannelHostFactory* factory, | 86 GpuChannelHostFactory* factory, |
| 83 const base::WeakPtr<WebGraphicsContext3DSwapBuffersClient>& swap_client); | 87 const base::WeakPtr<WebGraphicsContext3DSwapBuffersClient>& swap_client); |
| 84 | 88 |
| 85 virtual ~WebGraphicsContext3DCommandBufferImpl(); | 89 virtual ~WebGraphicsContext3DCommandBufferImpl(); |
| 86 | 90 |
| 87 bool Initialize(const Attributes& attributes, | 91 bool Initialize(const Attributes& attributes, |
| 88 bool bind_generates_resources, | 92 bool bind_generates_resources, |
| 89 CauseForGpuLaunch cause, | 93 CauseForGpuLaunch cause, |
| 90 size_t command_buffer_size, | 94 size_t command_buffer_size, |
| 91 size_t start_transfer_buffer_size, | 95 size_t start_transfer_buffer_size, |
| 92 size_t min_transfer_buffer_size, | 96 size_t min_transfer_buffer_size, |
| 93 size_t max_transfer_buffer_size); | 97 size_t max_transfer_buffer_size, |
| 98 size_t mapped_memory_reclaim_limit); |
| 94 | 99 |
| 95 bool InitializeWithDefaultBufferSizes(const Attributes& attributes, | 100 bool InitializeWithDefaultBufferSizes(const Attributes& attributes, |
| 96 bool bind_generates_resources, | 101 bool bind_generates_resources, |
| 97 CauseForGpuLaunch cause); | 102 CauseForGpuLaunch cause); |
| 98 | 103 |
| 99 // The following 3 IDs let one uniquely identify this context. | 104 // The following 3 IDs let one uniquely identify this context. |
| 100 // Gets the GPU process ID for this context. | 105 // Gets the GPU process ID for this context. |
| 101 int GetGPUProcessID(); | 106 int GetGPUProcessID(); |
| 102 | 107 |
| 103 // Gets the channel ID for this context. | 108 // Gets the channel ID for this context. |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 scoped_ptr<gpu::gles2::GLES2Implementation> real_gl_; | 755 scoped_ptr<gpu::gles2::GLES2Implementation> real_gl_; |
| 751 scoped_ptr<gpu::gles2::GLES2Interface> trace_gl_; | 756 scoped_ptr<gpu::gles2::GLES2Interface> trace_gl_; |
| 752 Error last_error_; | 757 Error last_error_; |
| 753 int frame_number_; | 758 int frame_number_; |
| 754 bool bind_generates_resources_; | 759 bool bind_generates_resources_; |
| 755 bool use_echo_for_swap_ack_; | 760 bool use_echo_for_swap_ack_; |
| 756 size_t command_buffer_size_; | 761 size_t command_buffer_size_; |
| 757 size_t start_transfer_buffer_size_; | 762 size_t start_transfer_buffer_size_; |
| 758 size_t min_transfer_buffer_size_; | 763 size_t min_transfer_buffer_size_; |
| 759 size_t max_transfer_buffer_size_; | 764 size_t max_transfer_buffer_size_; |
| 765 size_t mapped_memory_limit_; |
| 760 }; | 766 }; |
| 761 | 767 |
| 762 } // namespace content | 768 } // namespace content |
| 763 | 769 |
| 764 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 770 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
| OLD | NEW |