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/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/gfx/size.h" | 10 #include "ui/gfx/size.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class TransferBuffer; | 23 class TransferBuffer; |
24 class GpuScheduler; | 24 class GpuScheduler; |
25 | 25 |
26 namespace gles2 { | 26 namespace gles2 { |
27 | 27 |
28 class ContextGroup; | 28 class ContextGroup; |
29 class MailboxManager; | 29 class MailboxManager; |
30 class GLES2Decoder; | 30 class GLES2Decoder; |
31 class GLES2CmdHelper; | 31 class GLES2CmdHelper; |
32 class GLES2Implementation; | 32 class GLES2Implementation; |
| 33 class ImageFactory; |
| 34 class ImageManager; |
33 class ShareGroup; | 35 class ShareGroup; |
34 | 36 |
35 }; | 37 }; |
36 | 38 |
37 class GLManager { | 39 class GLManager { |
38 public: | 40 public: |
39 struct Options { | 41 struct Options { |
40 Options(); | 42 Options(); |
41 // The size of the backbuffer. | 43 // The size of the backbuffer. |
42 gfx::Size size; | 44 gfx::Size size; |
43 // If not null will share resources with this context. | 45 // If not null will share resources with this context. |
44 GLManager* share_group_manager; | 46 GLManager* share_group_manager; |
45 // If not null will share a mailbox manager with this context. | 47 // If not null will share a mailbox manager with this context. |
46 GLManager* share_mailbox_manager; | 48 GLManager* share_mailbox_manager; |
47 // If not null will create a virtual manager based on this context. | 49 // If not null will create a virtual manager based on this context. |
48 GLManager* virtual_manager; | 50 GLManager* virtual_manager; |
49 // Whether or not glBindXXX generates a resource. | 51 // Whether or not glBindXXX generates a resource. |
50 bool bind_generates_resource; | 52 bool bind_generates_resource; |
51 // Whether or not it's ok to lose the context. | 53 // Whether or not it's ok to lose the context. |
52 bool context_lost_allowed; | 54 bool context_lost_allowed; |
| 55 // Image manager to be used. |
| 56 gles2::ImageManager* image_manager; |
| 57 // Image factory to be used. |
| 58 gles2::ImageFactory* image_factory; |
53 }; | 59 }; |
54 GLManager(); | 60 GLManager(); |
55 ~GLManager(); | 61 ~GLManager(); |
56 | 62 |
57 void Initialize(const Options& options); | 63 void Initialize(const Options& options); |
58 void Destroy(); | 64 void Destroy(); |
59 | 65 |
60 void MakeCurrent(); | 66 void MakeCurrent(); |
61 | 67 |
62 void SetSurface(gfx::GLSurface* surface); | 68 void SetSurface(gfx::GLSurface* surface); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // Used on Android to virtualize GL for all contexts. | 103 // Used on Android to virtualize GL for all contexts. |
98 static int use_count_; | 104 static int use_count_; |
99 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; | 105 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; |
100 static scoped_refptr<gfx::GLSurface>* base_surface_; | 106 static scoped_refptr<gfx::GLSurface>* base_surface_; |
101 static scoped_refptr<gfx::GLContext>* base_context_; | 107 static scoped_refptr<gfx::GLContext>* base_context_; |
102 }; | 108 }; |
103 | 109 |
104 } // namespace gpu | 110 } // namespace gpu |
105 | 111 |
106 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 112 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
OLD | NEW |