| 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 GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
| 6 #define GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include "base/containers/scoped_ptr_hash_map.h" | 11 #include "base/containers/scoped_ptr_hash_map.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "gpu/command_buffer/client/gpu_control.h" | 14 #include "gpu/command_buffer/client/gpu_control.h" |
| 15 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 15 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 16 #include "gpu/command_buffer/service/feature_info.h" | 16 #include "gpu/command_buffer/service/feature_info.h" |
| 17 #include "gpu/command_buffer/service/gpu_preferences.h" | 17 #include "gpu/command_buffer/service/gpu_preferences.h" |
| 18 #include "gpu/config/gpu_driver_bug_workarounds.h" |
| 18 #include "ui/gfx/geometry/size.h" | 19 #include "ui/gfx/geometry/size.h" |
| 19 #include "ui/gfx/gpu_memory_buffer.h" | 20 #include "ui/gfx/gpu_memory_buffer.h" |
| 20 | 21 |
| 21 namespace base { | 22 namespace base { |
| 22 class CommandLine; | 23 class CommandLine; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace gfx { | 26 namespace gfx { |
| 26 | 27 |
| 27 class GLContext; | 28 class GLContext; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 } | 113 } |
| 113 | 114 |
| 114 gles2::GLES2Implementation* gles2_implementation() const { | 115 gles2::GLES2Implementation* gles2_implementation() const { |
| 115 return gles2_implementation_.get(); | 116 return gles2_implementation_.get(); |
| 116 } | 117 } |
| 117 | 118 |
| 118 gfx::GLContext* context() { | 119 gfx::GLContext* context() { |
| 119 return context_.get(); | 120 return context_.get(); |
| 120 } | 121 } |
| 121 | 122 |
| 122 const gpu::gles2::FeatureInfo::Workarounds& workarounds() const; | 123 const gpu::GpuDriverBugWorkarounds& workarounds() const; |
| 123 | 124 |
| 124 // GpuControl implementation. | 125 // GpuControl implementation. |
| 125 Capabilities GetCapabilities() override; | 126 Capabilities GetCapabilities() override; |
| 126 int32_t CreateImage(ClientBuffer buffer, | 127 int32_t CreateImage(ClientBuffer buffer, |
| 127 size_t width, | 128 size_t width, |
| 128 size_t height, | 129 size_t height, |
| 129 unsigned internalformat) override; | 130 unsigned internalformat) override; |
| 130 void DestroyImage(int32_t id) override; | 131 void DestroyImage(int32_t id) override; |
| 131 int32_t CreateGpuMemoryBufferImage(size_t width, | 132 int32_t CreateGpuMemoryBufferImage(size_t width, |
| 132 size_t height, | 133 size_t height, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 150 private: | 151 private: |
| 151 void PumpCommands(); | 152 void PumpCommands(); |
| 152 bool GetBufferChanged(int32_t transfer_buffer_id); | 153 bool GetBufferChanged(int32_t transfer_buffer_id); |
| 153 void SetupBaseContext(); | 154 void SetupBaseContext(); |
| 154 void OnFenceSyncRelease(uint64_t release); | 155 void OnFenceSyncRelease(uint64_t release); |
| 155 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id, | 156 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id, |
| 156 gpu::CommandBufferId command_buffer_id, | 157 gpu::CommandBufferId command_buffer_id, |
| 157 uint64_t release); | 158 uint64_t release); |
| 158 | 159 |
| 159 gpu::GpuPreferences gpu_preferences_; | 160 gpu::GpuPreferences gpu_preferences_; |
| 161 gpu::GpuDriverBugWorkarounds gpu_driver_bug_workarounds_; |
| 160 | 162 |
| 161 SyncPointManager* sync_point_manager_; // Non-owning. | 163 SyncPointManager* sync_point_manager_; // Non-owning. |
| 162 | 164 |
| 163 scoped_refptr<SyncPointOrderData> sync_point_order_data_; | 165 scoped_refptr<SyncPointOrderData> sync_point_order_data_; |
| 164 scoped_ptr<SyncPointClient> sync_point_client_; | 166 scoped_ptr<SyncPointClient> sync_point_client_; |
| 165 scoped_refptr<gles2::MailboxManager> mailbox_manager_; | 167 scoped_refptr<gles2::MailboxManager> mailbox_manager_; |
| 166 scoped_refptr<gfx::GLShareGroup> share_group_; | 168 scoped_refptr<gfx::GLShareGroup> share_group_; |
| 167 scoped_ptr<CommandBufferService> command_buffer_; | 169 scoped_ptr<CommandBufferService> command_buffer_; |
| 168 scoped_ptr<gles2::GLES2Decoder> decoder_; | 170 scoped_ptr<gles2::GLES2Decoder> decoder_; |
| 169 scoped_ptr<CommandExecutor> executor_; | 171 scoped_ptr<CommandExecutor> executor_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 184 // Used on Android to virtualize GL for all contexts. | 186 // Used on Android to virtualize GL for all contexts. |
| 185 static int use_count_; | 187 static int use_count_; |
| 186 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; | 188 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; |
| 187 static scoped_refptr<gfx::GLSurface>* base_surface_; | 189 static scoped_refptr<gfx::GLSurface>* base_surface_; |
| 188 static scoped_refptr<gfx::GLContext>* base_context_; | 190 static scoped_refptr<gfx::GLContext>* base_context_; |
| 189 }; | 191 }; |
| 190 | 192 |
| 191 } // namespace gpu | 193 } // namespace gpu |
| 192 | 194 |
| 193 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 195 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
| OLD | NEW |