| 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 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 void InitializeWithCommandLine(const Options& options, | 85 void InitializeWithCommandLine(const Options& options, |
| 86 base::CommandLine* command_line); | 86 base::CommandLine* command_line); |
| 87 void Destroy(); | 87 void Destroy(); |
| 88 | 88 |
| 89 bool IsInitialized() const { return gles2_implementation() != nullptr; } | 89 bool IsInitialized() const { return gles2_implementation() != nullptr; } |
| 90 | 90 |
| 91 void MakeCurrent(); | 91 void MakeCurrent(); |
| 92 | 92 |
| 93 void SetSurface(gfx::GLSurface* surface); | 93 void SetSurface(gfx::GLSurface* surface); |
| 94 | 94 |
| 95 void SetCommandsPaused(bool paused) { pause_commands_ = paused; } |
| 96 |
| 95 gles2::GLES2Decoder* decoder() const { | 97 gles2::GLES2Decoder* decoder() const { |
| 96 return decoder_.get(); | 98 return decoder_.get(); |
| 97 } | 99 } |
| 98 | 100 |
| 99 gles2::MailboxManager* mailbox_manager() const { | 101 gles2::MailboxManager* mailbox_manager() const { |
| 100 return mailbox_manager_.get(); | 102 return mailbox_manager_.get(); |
| 101 } | 103 } |
| 102 | 104 |
| 103 gfx::GLShareGroup* share_group() const { | 105 gfx::GLShareGroup* share_group() const { |
| 104 return share_group_.get(); | 106 return share_group_.get(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 scoped_refptr<gfx::GLShareGroup> share_group_; | 164 scoped_refptr<gfx::GLShareGroup> share_group_; |
| 163 scoped_ptr<CommandBufferService> command_buffer_; | 165 scoped_ptr<CommandBufferService> command_buffer_; |
| 164 scoped_ptr<gles2::GLES2Decoder> decoder_; | 166 scoped_ptr<gles2::GLES2Decoder> decoder_; |
| 165 scoped_ptr<GpuScheduler> gpu_scheduler_; | 167 scoped_ptr<GpuScheduler> gpu_scheduler_; |
| 166 scoped_refptr<gfx::GLSurface> surface_; | 168 scoped_refptr<gfx::GLSurface> surface_; |
| 167 scoped_refptr<gfx::GLContext> context_; | 169 scoped_refptr<gfx::GLContext> context_; |
| 168 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_; | 170 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_; |
| 169 scoped_ptr<TransferBuffer> transfer_buffer_; | 171 scoped_ptr<TransferBuffer> transfer_buffer_; |
| 170 scoped_ptr<gles2::GLES2Implementation> gles2_implementation_; | 172 scoped_ptr<gles2::GLES2Implementation> gles2_implementation_; |
| 171 bool context_lost_allowed_; | 173 bool context_lost_allowed_; |
| 174 bool pause_commands_; |
| 175 uint32_t paused_order_num_; |
| 172 | 176 |
| 173 const uint64_t command_buffer_id_; | 177 const uint64_t command_buffer_id_; |
| 174 uint64_t next_fence_sync_release_; | 178 uint64_t next_fence_sync_release_; |
| 175 | 179 |
| 176 // Used on Android to virtualize GL for all contexts. | 180 // Used on Android to virtualize GL for all contexts. |
| 177 static int use_count_; | 181 static int use_count_; |
| 178 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; | 182 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; |
| 179 static scoped_refptr<gfx::GLSurface>* base_surface_; | 183 static scoped_refptr<gfx::GLSurface>* base_surface_; |
| 180 static scoped_refptr<gfx::GLContext>* base_context_; | 184 static scoped_refptr<gfx::GLContext>* base_context_; |
| 181 }; | 185 }; |
| 182 | 186 |
| 183 } // namespace gpu | 187 } // namespace gpu |
| 184 | 188 |
| 185 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 189 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
| OLD | NEW |