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

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

Issue 1331843005: Implemented new fence syncs which replaces the old sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed memory leak Created 5 years, 2 months 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 "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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 void RetireSyncPoint(uint32 sync_point) override; 120 void RetireSyncPoint(uint32 sync_point) override;
121 void SignalSyncPoint(uint32 sync_point, 121 void SignalSyncPoint(uint32 sync_point,
122 const base::Closure& callback) override; 122 const base::Closure& callback) override;
123 void SignalQuery(uint32 query, const base::Closure& callback) override; 123 void SignalQuery(uint32 query, const base::Closure& callback) override;
124 void SetSurfaceVisible(bool visible) override; 124 void SetSurfaceVisible(bool visible) override;
125 uint32 CreateStreamTexture(uint32 texture_id) override; 125 uint32 CreateStreamTexture(uint32 texture_id) override;
126 void SetLock(base::Lock*) override; 126 void SetLock(base::Lock*) override;
127 bool IsGpuChannelLost() override; 127 bool IsGpuChannelLost() override;
128 gpu::CommandBufferNamespace GetNamespaceID() const override; 128 gpu::CommandBufferNamespace GetNamespaceID() const override;
129 uint64_t GetCommandBufferID() const override; 129 uint64_t GetCommandBufferID() const override;
130 uint64_t GenerateFenceSyncRelease() override;
131 bool IsFenceSyncRelease(uint64_t release) override;
132 bool IsFenceSyncFlushed(uint64_t release) override;
130 133
131 private: 134 private:
132 void PumpCommands(); 135 void PumpCommands();
133 bool GetBufferChanged(int32 transfer_buffer_id); 136 bool GetBufferChanged(int32 transfer_buffer_id);
134 void SetupBaseContext(); 137 void SetupBaseContext();
135 138
136 scoped_refptr<gles2::MailboxManager> mailbox_manager_; 139 scoped_refptr<gles2::MailboxManager> mailbox_manager_;
137 scoped_refptr<gfx::GLShareGroup> share_group_; 140 scoped_refptr<gfx::GLShareGroup> share_group_;
138 scoped_ptr<CommandBufferService> command_buffer_; 141 scoped_ptr<CommandBufferService> command_buffer_;
139 scoped_ptr<gles2::GLES2Decoder> decoder_; 142 scoped_ptr<gles2::GLES2Decoder> decoder_;
140 scoped_ptr<GpuScheduler> gpu_scheduler_; 143 scoped_ptr<GpuScheduler> gpu_scheduler_;
141 scoped_refptr<gfx::GLSurface> surface_; 144 scoped_refptr<gfx::GLSurface> surface_;
142 scoped_refptr<gfx::GLContext> context_; 145 scoped_refptr<gfx::GLContext> context_;
143 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_; 146 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_;
144 scoped_ptr<TransferBuffer> transfer_buffer_; 147 scoped_ptr<TransferBuffer> transfer_buffer_;
145 scoped_ptr<gles2::GLES2Implementation> gles2_implementation_; 148 scoped_ptr<gles2::GLES2Implementation> gles2_implementation_;
146 bool context_lost_allowed_; 149 bool context_lost_allowed_;
147 150
151 uint64_t next_fence_sync_release_;
152
148 // Used on Android to virtualize GL for all contexts. 153 // Used on Android to virtualize GL for all contexts.
149 static int use_count_; 154 static int use_count_;
150 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; 155 static scoped_refptr<gfx::GLShareGroup>* base_share_group_;
151 static scoped_refptr<gfx::GLSurface>* base_surface_; 156 static scoped_refptr<gfx::GLSurface>* base_surface_;
152 static scoped_refptr<gfx::GLContext>* base_context_; 157 static scoped_refptr<gfx::GLContext>* base_context_;
153 }; 158 };
154 159
155 } // namespace gpu 160 } // namespace gpu
156 161
157 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ 162 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698