| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 }; | 77 }; |
| 78 GLManager(); | 78 GLManager(); |
| 79 ~GLManager() override; | 79 ~GLManager() override; |
| 80 | 80 |
| 81 scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer( | 81 scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer( |
| 82 const gfx::Size& size, | 82 const gfx::Size& size, |
| 83 gfx::BufferFormat format); | 83 gfx::BufferFormat format); |
| 84 | 84 |
| 85 void Initialize(const Options& options); | 85 void Initialize(const Options& options); |
| 86 void InitializeWithCommandLine(const Options& options, | 86 void InitializeWithCommandLine(const Options& options, |
| 87 base::CommandLine* command_line); | 87 const base::CommandLine& command_line); |
| 88 void Destroy(); | 88 void Destroy(); |
| 89 | 89 |
| 90 bool IsInitialized() const { return gles2_implementation() != nullptr; } | 90 bool IsInitialized() const { return gles2_implementation() != nullptr; } |
| 91 | 91 |
| 92 void MakeCurrent(); | 92 void MakeCurrent(); |
| 93 | 93 |
| 94 void SetSurface(gfx::GLSurface* surface); | 94 void SetSurface(gfx::GLSurface* surface); |
| 95 | 95 |
| 96 void set_use_iosurface_memory_buffers(bool use_iosurface_memory_buffers) { | 96 void set_use_iosurface_memory_buffers(bool use_iosurface_memory_buffers) { |
| 97 use_iosurface_memory_buffers_ = use_iosurface_memory_buffers; | 97 use_iosurface_memory_buffers_ = use_iosurface_memory_buffers; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 112 } | 112 } |
| 113 | 113 |
| 114 gles2::GLES2Implementation* gles2_implementation() const { | 114 gles2::GLES2Implementation* gles2_implementation() const { |
| 115 return gles2_implementation_.get(); | 115 return gles2_implementation_.get(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 gfx::GLContext* context() { | 118 gfx::GLContext* context() { |
| 119 return context_.get(); | 119 return context_.get(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 const gpu::gles2::FeatureInfo::Workarounds& workarounds() const; | 122 const GpuDriverBugWorkarounds& workarounds() const; |
| 123 | 123 |
| 124 // GpuControl implementation. | 124 // GpuControl implementation. |
| 125 void SetGpuControlClient(GpuControlClient*) override; | 125 void SetGpuControlClient(GpuControlClient*) override; |
| 126 Capabilities GetCapabilities() override; | 126 Capabilities GetCapabilities() override; |
| 127 int32_t CreateImage(ClientBuffer buffer, | 127 int32_t CreateImage(ClientBuffer buffer, |
| 128 size_t width, | 128 size_t width, |
| 129 size_t height, | 129 size_t height, |
| 130 unsigned internalformat) override; | 130 unsigned internalformat) override; |
| 131 void DestroyImage(int32_t id) override; | 131 void DestroyImage(int32_t id) override; |
| 132 int32_t CreateGpuMemoryBufferImage(size_t width, | 132 int32_t CreateGpuMemoryBufferImage(size_t width, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // Used on Android to virtualize GL for all contexts. | 185 // Used on Android to virtualize GL for all contexts. |
| 186 static int use_count_; | 186 static int use_count_; |
| 187 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; | 187 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; |
| 188 static scoped_refptr<gfx::GLSurface>* base_surface_; | 188 static scoped_refptr<gfx::GLSurface>* base_surface_; |
| 189 static scoped_refptr<gfx::GLContext>* base_context_; | 189 static scoped_refptr<gfx::GLContext>* base_context_; |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 } // namespace gpu | 192 } // namespace gpu |
| 193 | 193 |
| 194 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 194 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
| OLD | NEW |