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

Unified Diff: gpu/command_buffer/service/in_process_command_buffer.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
Index: gpu/command_buffer/service/in_process_command_buffer.h
diff --git a/gpu/command_buffer/service/in_process_command_buffer.h b/gpu/command_buffer/service/in_process_command_buffer.h
index f4f91f81009b027c9cd70ca5a85f4a1f224833ad..7843aa3ac02678edff53963ccc6b080c1a327e5a 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.h
+++ b/gpu/command_buffer/service/in_process_command_buffer.h
@@ -48,7 +48,7 @@ class StreamTextureManagerInProcess;
namespace gpu {
class SyncPointClient;
-class SyncPointClientState;
+class SyncPointOrderData;
class SyncPointManager;
class ValueStateMap;
@@ -130,6 +130,9 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer,
bool IsGpuChannelLost() override;
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;
// The serializer interface to the GPU service (i.e. thread).
class Service {
@@ -215,6 +218,10 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer,
void SignalSyncPointOnGpuThread(uint32 sync_point,
const base::Closure& callback);
bool WaitSyncPointOnGpuThread(uint32 sync_point);
+ void FenceSyncReleaseOnGpuThread(uint64_t release);
+ bool WaitFenceSyncOnGpuThread(gpu::CommandBufferNamespace namespace_id,
+ uint64_t command_buffer_id,
+ uint64_t release);
void SignalQueryOnGpuThread(unsigned query_id, const base::Closure& callback);
void DestroyTransferBufferOnGpuThread(int32 id);
void CreateImageOnGpuThread(int32 id,
@@ -242,7 +249,7 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer,
scoped_ptr<gles2::GLES2Decoder> decoder_;
scoped_refptr<gfx::GLContext> context_;
scoped_refptr<gfx::GLSurface> surface_;
- scoped_refptr<SyncPointClientState> sync_point_client_state_;
+ scoped_refptr<SyncPointOrderData> sync_point_order_data_;
scoped_ptr<SyncPointClient> sync_point_client_;
base::Closure context_lost_callback_;
bool delayed_work_pending_; // Used to throttle PerformDelayedWork.
@@ -254,6 +261,8 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer,
gpu::Capabilities capabilities_;
GpuMemoryBufferManager* gpu_memory_buffer_manager_;
base::AtomicSequenceNumber next_image_id_;
+ uint64_t next_fence_sync_release_;
+ uint64_t flushed_fence_sync_release_;
// Accessed on both threads:
scoped_ptr<CommandBufferServiceBase> command_buffer_;
@@ -263,6 +272,7 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer,
State state_after_last_flush_;
base::Lock state_after_last_flush_lock_;
scoped_refptr<gfx::GLShareGroup> gl_share_group_;
+ base::WaitableEvent fence_sync_wait_event_;
#if defined(OS_ANDROID)
scoped_ptr<StreamTextureManagerInProcess> stream_texture_manager_;

Powered by Google App Engine
This is Rietveld 408576698