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 "base/containers/scoped_ptr_hash_map.h" | 8 #include "base/containers/scoped_ptr_hash_map.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // 0 indicates not WebGL context - default. | 64 // 0 indicates not WebGL context - default. |
65 // 1 indicates WebGL 1 context. | 65 // 1 indicates WebGL 1 context. |
66 // 2 indicates WebGL 2 context. | 66 // 2 indicates WebGL 2 context. |
67 unsigned webgl_version; | 67 unsigned webgl_version; |
68 }; | 68 }; |
69 GLManager(); | 69 GLManager(); |
70 ~GLManager() override; | 70 ~GLManager() override; |
71 | 71 |
72 static scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer( | 72 static scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer( |
73 const gfx::Size& size, | 73 const gfx::Size& size, |
74 gfx::GpuMemoryBuffer::Format format); | 74 gfx::BufferFormat format); |
75 | 75 |
76 void Initialize(const Options& options); | 76 void Initialize(const Options& options); |
77 void InitializeWithCommandLine(const Options& options, | 77 void InitializeWithCommandLine(const Options& options, |
78 base::CommandLine* command_line); | 78 base::CommandLine* command_line); |
79 void Destroy(); | 79 void Destroy(); |
80 | 80 |
81 void MakeCurrent(); | 81 void MakeCurrent(); |
82 | 82 |
83 void SetSurface(gfx::GLSurface* surface); | 83 void SetSurface(gfx::GLSurface* surface); |
84 | 84 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // Used on Android to virtualize GL for all contexts. | 146 // Used on Android to virtualize GL for all contexts. |
147 static int use_count_; | 147 static int use_count_; |
148 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; | 148 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; |
149 static scoped_refptr<gfx::GLSurface>* base_surface_; | 149 static scoped_refptr<gfx::GLSurface>* base_surface_; |
150 static scoped_refptr<gfx::GLContext>* base_context_; | 150 static scoped_refptr<gfx::GLContext>* base_context_; |
151 }; | 151 }; |
152 | 152 |
153 } // namespace gpu | 153 } // namespace gpu |
154 | 154 |
155 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 155 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
OLD | NEW |