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

Side by Side Diff: ppapi/proxy/ppapi_command_buffer_proxy.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 unified diff | Download patch
« no previous file with comments | « mojo/gpu/mojo_gles2_impl_autogen.cc ('k') | ppapi/proxy/ppapi_command_buffer_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ 5 #ifndef PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_
6 #define PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ 6 #define PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void RetireSyncPoint(uint32 sync_point) override; 63 void RetireSyncPoint(uint32 sync_point) override;
64 void SignalSyncPoint(uint32 sync_point, 64 void SignalSyncPoint(uint32 sync_point,
65 const base::Closure& callback) override; 65 const base::Closure& callback) override;
66 void SignalQuery(uint32 query, const base::Closure& callback) override; 66 void SignalQuery(uint32 query, const base::Closure& callback) override;
67 void SetSurfaceVisible(bool visible) override; 67 void SetSurfaceVisible(bool visible) override;
68 uint32 CreateStreamTexture(uint32 texture_id) override; 68 uint32 CreateStreamTexture(uint32 texture_id) override;
69 void SetLock(base::Lock*) override; 69 void SetLock(base::Lock*) override;
70 bool IsGpuChannelLost() override; 70 bool IsGpuChannelLost() override;
71 gpu::CommandBufferNamespace GetNamespaceID() const override; 71 gpu::CommandBufferNamespace GetNamespaceID() const override;
72 uint64_t GetCommandBufferID() const override; 72 uint64_t GetCommandBufferID() const override;
73 uint64_t GenerateFenceSyncRelease() override;
74 bool IsFenceSyncRelease(uint64_t release) override;
75 bool IsFenceSyncFlushed(uint64_t release) override;
73 76
74 private: 77 private:
75 bool Send(IPC::Message* msg); 78 bool Send(IPC::Message* msg);
76 void UpdateState(const gpu::CommandBuffer::State& state, bool success); 79 void UpdateState(const gpu::CommandBuffer::State& state, bool success);
77 80
78 // Try to read an updated copy of the state from shared memory. 81 // Try to read an updated copy of the state from shared memory.
79 void TryUpdateState(); 82 void TryUpdateState();
80 83
81 // The shared memory area used to update state. 84 // The shared memory area used to update state.
82 gpu::CommandBufferSharedState* shared_state() const; 85 gpu::CommandBufferSharedState* shared_state() const;
83 86
84 void FlushInternal(); 87 void FlushInternal();
85 88
86 const uint64_t command_buffer_id_; 89 const uint64_t command_buffer_id_;
87 90
88 gpu::Capabilities capabilities_; 91 gpu::Capabilities capabilities_;
89 State last_state_; 92 State last_state_;
90 scoped_ptr<base::SharedMemory> shared_state_shm_; 93 scoped_ptr<base::SharedMemory> shared_state_shm_;
91 94
92 HostResource resource_; 95 HostResource resource_;
93 PluginDispatcher* dispatcher_; 96 PluginDispatcher* dispatcher_;
94 97
95 base::Closure channel_error_callback_; 98 base::Closure channel_error_callback_;
96 99
97 InstanceData::FlushInfo *flush_info_; 100 InstanceData::FlushInfo *flush_info_;
98 101
102 uint64_t next_fence_sync_release_;
103 uint64_t pending_fence_sync_release_;
104 uint64_t flushed_fence_sync_release_;
105
99 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy); 106 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy);
100 }; 107 };
101 108
102 } // namespace proxy 109 } // namespace proxy
103 } // namespace ppapi 110 } // namespace ppapi
104 111
105 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ 112 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_
OLDNEW
« no previous file with comments | « mojo/gpu/mojo_gles2_impl_autogen.cc ('k') | ppapi/proxy/ppapi_command_buffer_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698