Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: gpu/command_buffer/tests/gl_manager.h

Issue 2550583002: gpu: Thread-safe command buffer state lookup. (Closed)
Patch Set: jbauman's review Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 void InitializeWithCommandLine(const Options& options, 93 void InitializeWithCommandLine(const Options& options,
94 const base::CommandLine& command_line); 94 const base::CommandLine& command_line);
95 void Destroy(); 95 void Destroy();
96 96
97 bool IsInitialized() const { return gles2_implementation() != nullptr; } 97 bool IsInitialized() const { return gles2_implementation() != nullptr; }
98 98
99 void MakeCurrent(); 99 void MakeCurrent();
100 100
101 void SetSurface(gl::GLSurface* surface); 101 void SetSurface(gl::GLSurface* surface);
102 102
103 void PerformIdleWork();
104
103 void set_use_iosurface_memory_buffers(bool use_iosurface_memory_buffers) { 105 void set_use_iosurface_memory_buffers(bool use_iosurface_memory_buffers) {
104 use_iosurface_memory_buffers_ = use_iosurface_memory_buffers; 106 use_iosurface_memory_buffers_ = use_iosurface_memory_buffers;
105 } 107 }
106 108
107 void SetCommandsPaused(bool paused) { pause_commands_ = paused; } 109 void SetCommandsPaused(bool paused) { pause_commands_ = paused; }
108 110
109 gles2::GLES2Decoder* decoder() const { 111 gles2::GLES2Decoder* decoder() const {
110 return decoder_.get(); 112 return decoder_.get();
111 } 113 }
112 114
(...skipping 26 matching lines...) Expand all
139 void SignalQuery(uint32_t query, const base::Closure& callback) override; 141 void SignalQuery(uint32_t query, const base::Closure& callback) override;
140 void SetLock(base::Lock*) override; 142 void SetLock(base::Lock*) override;
141 void EnsureWorkVisible() override; 143 void EnsureWorkVisible() override;
142 gpu::CommandBufferNamespace GetNamespaceID() const override; 144 gpu::CommandBufferNamespace GetNamespaceID() const override;
143 CommandBufferId GetCommandBufferID() const override; 145 CommandBufferId GetCommandBufferID() const override;
144 int32_t GetExtraCommandBufferData() const override; 146 int32_t GetExtraCommandBufferData() const override;
145 uint64_t GenerateFenceSyncRelease() override; 147 uint64_t GenerateFenceSyncRelease() override;
146 bool IsFenceSyncRelease(uint64_t release) override; 148 bool IsFenceSyncRelease(uint64_t release) override;
147 bool IsFenceSyncFlushed(uint64_t release) override; 149 bool IsFenceSyncFlushed(uint64_t release) override;
148 bool IsFenceSyncFlushReceived(uint64_t release) override; 150 bool IsFenceSyncFlushReceived(uint64_t release) override;
151 bool IsFenceSyncReleased(uint64_t release) override;
149 void SignalSyncToken(const gpu::SyncToken& sync_token, 152 void SignalSyncToken(const gpu::SyncToken& sync_token,
150 const base::Closure& callback) override; 153 const base::Closure& callback) override;
151 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override; 154 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override;
152 155
153 private: 156 private:
154 void PumpCommands(); 157 void PumpCommands();
155 bool GetBufferChanged(int32_t transfer_buffer_id); 158 bool GetBufferChanged(int32_t transfer_buffer_id);
156 void SetupBaseContext(); 159 void SetupBaseContext();
157 void OnFenceSyncRelease(uint64_t release); 160 void OnFenceSyncRelease(uint64_t release);
158 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id, 161 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id,
(...skipping 28 matching lines...) Expand all
187 // Used on Android to virtualize GL for all contexts. 190 // Used on Android to virtualize GL for all contexts.
188 static int use_count_; 191 static int use_count_;
189 static scoped_refptr<gl::GLShareGroup>* base_share_group_; 192 static scoped_refptr<gl::GLShareGroup>* base_share_group_;
190 static scoped_refptr<gl::GLSurface>* base_surface_; 193 static scoped_refptr<gl::GLSurface>* base_surface_;
191 static scoped_refptr<gl::GLContext>* base_context_; 194 static scoped_refptr<gl::GLContext>* base_context_;
192 }; 195 };
193 196
194 } // namespace gpu 197 } // namespace gpu
195 198
196 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ 199 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/command_buffer_service.cc ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698