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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 return gles2_implementation_.get(); | 83 return gles2_implementation_.get(); |
84 } | 84 } |
85 | 85 |
86 gfx::GLContext* context() { | 86 gfx::GLContext* context() { |
87 return context_.get(); | 87 return context_.get(); |
88 } | 88 } |
89 | 89 |
90 const gpu::gles2::FeatureInfo::Workarounds& workarounds() const; | 90 const gpu::gles2::FeatureInfo::Workarounds& workarounds() const; |
91 | 91 |
92 // GpuControl implementation. | 92 // GpuControl implementation. |
93 virtual Capabilities GetCapabilities() OVERRIDE; | 93 virtual Capabilities GetCapabilities() override; |
94 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer(size_t width, | 94 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer(size_t width, |
95 size_t height, | 95 size_t height, |
96 unsigned internalformat, | 96 unsigned internalformat, |
97 unsigned usage, | 97 unsigned usage, |
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 uint32 CreateStreamTexture(uint32 texture_id) OVERRIDE; | 108 virtual uint32 CreateStreamTexture(uint32 texture_id) override; |
109 | 109 |
110 private: | 110 private: |
111 void PumpCommands(); | 111 void PumpCommands(); |
112 bool GetBufferChanged(int32 transfer_buffer_id); | 112 bool GetBufferChanged(int32 transfer_buffer_id); |
113 void SetupBaseContext(); | 113 void SetupBaseContext(); |
114 | 114 |
115 scoped_refptr<gles2::MailboxManager> mailbox_manager_; | 115 scoped_refptr<gles2::MailboxManager> mailbox_manager_; |
116 scoped_refptr<gfx::GLShareGroup> share_group_; | 116 scoped_refptr<gfx::GLShareGroup> share_group_; |
117 scoped_ptr<CommandBufferService> command_buffer_; | 117 scoped_ptr<CommandBufferService> command_buffer_; |
118 scoped_ptr<gles2::GLES2Decoder> decoder_; | 118 scoped_ptr<gles2::GLES2Decoder> decoder_; |
(...skipping 11 matching lines...) Expand all Loading... |
130 // Used on Android to virtualize GL for all contexts. | 130 // Used on Android to virtualize GL for all contexts. |
131 static int use_count_; | 131 static int use_count_; |
132 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; | 132 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; |
133 static scoped_refptr<gfx::GLSurface>* base_surface_; | 133 static scoped_refptr<gfx::GLSurface>* base_surface_; |
134 static scoped_refptr<gfx::GLContext>* base_context_; | 134 static scoped_refptr<gfx::GLContext>* base_context_; |
135 }; | 135 }; |
136 | 136 |
137 } // namespace gpu | 137 } // namespace gpu |
138 | 138 |
139 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 139 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
OLD | NEW |