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

Unified 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: Reverted mojo readme, changed wait() to take a pointer 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/tests/gl_fence_sync_unittest.cc ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/gl_manager.h
diff --git a/gpu/command_buffer/tests/gl_manager.h b/gpu/command_buffer/tests/gl_manager.h
index 16c8e29839fc328ba2580ebb3af213890225cd02..901bae8a0a0aeef29de56ea2ecb799099856fc8b 100644
--- a/gpu/command_buffer/tests/gl_manager.h
+++ b/gpu/command_buffer/tests/gl_manager.h
@@ -30,6 +30,9 @@ namespace gpu {
class CommandBufferService;
class GpuScheduler;
+class SyncPointClient;
+class SyncPointOrderData;
+class SyncPointManager;
class TransferBuffer;
namespace gles2 {
@@ -50,6 +53,8 @@ class GLManager : private GpuControl {
Options();
// The size of the backbuffer.
gfx::Size size;
+ // If not null will have a corresponding sync point manager.
+ SyncPointManager* sync_point_manager;
// If not null will share resources with this context.
GLManager* share_group_manager;
// If not null will share a mailbox manager with this context.
@@ -127,12 +132,23 @@ class GLManager : private GpuControl {
bool IsGpuChannelLost() override;
gpu::CommandBufferNamespace GetNamespaceID() const override;
uint64_t GetCommandBufferID() const override;
+ uint64_t GenerateFenceSyncRelease() override;
+ bool IsFenceSyncRelease(uint64_t release) override;
+ bool IsFenceSyncFlushed(uint64_t release) override;
private:
void PumpCommands();
bool GetBufferChanged(int32 transfer_buffer_id);
void SetupBaseContext();
+ void OnFenceSyncRelease(uint64_t release);
+ bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id,
+ uint64_t command_buffer_id,
+ uint64_t release);
+ SyncPointManager* sync_point_manager_; // Non-owning.
+
+ scoped_refptr<SyncPointOrderData> sync_point_order_data_;
+ scoped_ptr<SyncPointClient> sync_point_client_;
scoped_refptr<gles2::MailboxManager> mailbox_manager_;
scoped_refptr<gfx::GLShareGroup> share_group_;
scoped_ptr<CommandBufferService> command_buffer_;
@@ -145,6 +161,9 @@ class GLManager : private GpuControl {
scoped_ptr<gles2::GLES2Implementation> gles2_implementation_;
bool context_lost_allowed_;
+ const uint64_t command_buffer_id_;
+ uint64_t next_fence_sync_release_;
+
// Used on Android to virtualize GL for all contexts.
static int use_count_;
static scoped_refptr<gfx::GLShareGroup>* base_share_group_;
« no previous file with comments | « gpu/command_buffer/tests/gl_fence_sync_unittest.cc ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698