| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 Capabilities GetCapabilities() override; | 125 Capabilities GetCapabilities() override; |
| 126 int32_t CreateImage(ClientBuffer buffer, | 126 int32_t CreateImage(ClientBuffer buffer, |
| 127 size_t width, | 127 size_t width, |
| 128 size_t height, | 128 size_t height, |
| 129 unsigned internalformat) override; | 129 unsigned internalformat) override; |
| 130 void DestroyImage(int32_t id) override; | 130 void DestroyImage(int32_t id) override; |
| 131 int32_t CreateGpuMemoryBufferImage(size_t width, | 131 int32_t CreateGpuMemoryBufferImage(size_t width, |
| 132 size_t height, | 132 size_t height, |
| 133 unsigned internalformat, | 133 unsigned internalformat, |
| 134 unsigned usage) override; | 134 unsigned usage) override; |
| 135 int32_t GetImageGpuMemoryBufferId(unsigned image_id) override; |
| 135 void SignalQuery(uint32_t query, const base::Closure& callback) override; | 136 void SignalQuery(uint32_t query, const base::Closure& callback) override; |
| 136 void SetLock(base::Lock*) override; | 137 void SetLock(base::Lock*) override; |
| 137 void EnsureWorkVisible() override; | 138 void EnsureWorkVisible() override; |
| 138 gpu::CommandBufferNamespace GetNamespaceID() const override; | 139 gpu::CommandBufferNamespace GetNamespaceID() const override; |
| 139 CommandBufferId GetCommandBufferID() const override; | 140 CommandBufferId GetCommandBufferID() const override; |
| 140 int32_t GetExtraCommandBufferData() const override; | 141 int32_t GetExtraCommandBufferData() const override; |
| 141 uint64_t GenerateFenceSyncRelease() override; | 142 uint64_t GenerateFenceSyncRelease() override; |
| 142 bool IsFenceSyncRelease(uint64_t release) override; | 143 bool IsFenceSyncRelease(uint64_t release) override; |
| 143 bool IsFenceSyncFlushed(uint64_t release) override; | 144 bool IsFenceSyncFlushed(uint64_t release) override; |
| 144 bool IsFenceSyncFlushReceived(uint64_t release) override; | 145 bool IsFenceSyncFlushReceived(uint64_t release) override; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 173 std::unique_ptr<gles2::GLES2Implementation> gles2_implementation_; | 174 std::unique_ptr<gles2::GLES2Implementation> gles2_implementation_; |
| 174 bool context_lost_allowed_; | 175 bool context_lost_allowed_; |
| 175 bool pause_commands_; | 176 bool pause_commands_; |
| 176 uint32_t paused_order_num_; | 177 uint32_t paused_order_num_; |
| 177 | 178 |
| 178 const CommandBufferId command_buffer_id_; | 179 const CommandBufferId command_buffer_id_; |
| 179 uint64_t next_fence_sync_release_; | 180 uint64_t next_fence_sync_release_; |
| 180 | 181 |
| 181 bool use_iosurface_memory_buffers_ = false; | 182 bool use_iosurface_memory_buffers_ = false; |
| 182 | 183 |
| 184 // A map from image id to GpuMemoryBuffer id. |
| 185 std::map<int32_t, int32_t> image_gmb_ids_map_; |
| 186 |
| 183 // Used on Android to virtualize GL for all contexts. | 187 // Used on Android to virtualize GL for all contexts. |
| 184 static int use_count_; | 188 static int use_count_; |
| 185 static scoped_refptr<gl::GLShareGroup>* base_share_group_; | 189 static scoped_refptr<gl::GLShareGroup>* base_share_group_; |
| 186 static scoped_refptr<gl::GLSurface>* base_surface_; | 190 static scoped_refptr<gl::GLSurface>* base_surface_; |
| 187 static scoped_refptr<gl::GLContext>* base_context_; | 191 static scoped_refptr<gl::GLContext>* base_context_; |
| 188 }; | 192 }; |
| 189 | 193 |
| 190 } // namespace gpu | 194 } // namespace gpu |
| 191 | 195 |
| 192 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 196 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
| OLD | NEW |