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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 int32* id) OVERRIDE; | 98 int32* id) OVERRIDE; |
99 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; | 99 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; |
100 virtual uint32 InsertSyncPoint() OVERRIDE; | 100 virtual uint32 InsertSyncPoint() OVERRIDE; |
101 virtual uint32 InsertFutureSyncPoint() OVERRIDE; | 101 virtual uint32 InsertFutureSyncPoint() OVERRIDE; |
102 virtual void RetireSyncPoint(uint32 sync_point) OVERRIDE; | 102 virtual void RetireSyncPoint(uint32 sync_point) OVERRIDE; |
103 virtual void SignalSyncPoint(uint32 sync_point, | 103 virtual void SignalSyncPoint(uint32 sync_point, |
104 const base::Closure& callback) OVERRIDE; | 104 const base::Closure& callback) OVERRIDE; |
105 virtual void SignalQuery(uint32 query, | 105 virtual void SignalQuery(uint32 query, |
106 const base::Closure& callback) OVERRIDE; | 106 const base::Closure& callback) OVERRIDE; |
107 virtual void SetSurfaceVisible(bool visible) OVERRIDE; | 107 virtual void SetSurfaceVisible(bool visible) OVERRIDE; |
108 virtual void Echo(const base::Closure& callback) OVERRIDE; | |
109 virtual uint32 CreateStreamTexture(uint32 texture_id) OVERRIDE; | 108 virtual uint32 CreateStreamTexture(uint32 texture_id) OVERRIDE; |
110 | 109 |
111 private: | 110 private: |
112 void PumpCommands(); | 111 void PumpCommands(); |
113 bool GetBufferChanged(int32 transfer_buffer_id); | 112 bool GetBufferChanged(int32 transfer_buffer_id); |
114 void SetupBaseContext(); | 113 void SetupBaseContext(); |
115 | 114 |
116 scoped_refptr<gles2::MailboxManager> mailbox_manager_; | 115 scoped_refptr<gles2::MailboxManager> mailbox_manager_; |
117 scoped_refptr<gfx::GLShareGroup> share_group_; | 116 scoped_refptr<gfx::GLShareGroup> share_group_; |
118 scoped_ptr<CommandBufferService> command_buffer_; | 117 scoped_ptr<CommandBufferService> command_buffer_; |
(...skipping 12 matching lines...) Expand all Loading... |
131 // Used on Android to virtualize GL for all contexts. | 130 // Used on Android to virtualize GL for all contexts. |
132 static int use_count_; | 131 static int use_count_; |
133 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; | 132 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; |
134 static scoped_refptr<gfx::GLSurface>* base_surface_; | 133 static scoped_refptr<gfx::GLSurface>* base_surface_; |
135 static scoped_refptr<gfx::GLContext>* base_context_; | 134 static scoped_refptr<gfx::GLContext>* base_context_; |
136 }; | 135 }; |
137 | 136 |
138 } // namespace gpu | 137 } // namespace gpu |
139 | 138 |
140 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 139 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
OLD | NEW |