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

Side by Side Diff: gpu/command_buffer/client/gpu_control.h

Issue 1559893003: Added method to synchronize command buffers within GpuControl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation errors Created 4 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_CLIENT_GPU_CONTROL_H_ 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // Sets a lock this will be held on every callback from the GPU 79 // Sets a lock this will be held on every callback from the GPU
80 // implementation. This lock must be set and must be held on every call into 80 // implementation. This lock must be set and must be held on every call into
81 // the GPU implementation if it is to be used from multiple threads. This 81 // the GPU implementation if it is to be used from multiple threads. This
82 // may not be supported with all implementations. 82 // may not be supported with all implementations.
83 virtual void SetLock(base::Lock*) = 0; 83 virtual void SetLock(base::Lock*) = 0;
84 84
85 // Returns true if the channel to the Gpu is lost. When true, all contexts 85 // Returns true if the channel to the Gpu is lost. When true, all contexts
86 // should be considered as lost. 86 // should be considered as lost.
87 virtual bool IsGpuChannelLost() = 0; 87 virtual bool IsGpuChannelLost() = 0;
88 88
89 // This command forces the server to the synchronized with the client by
90 // sending a synchronous IPC. Once this function returns, it is guaranteed
91 // that the server will have received any asynchronous commands previously
92 // sent by this command buffer. Note just that it is received does not
93 // necessarily mean that it has been processed. This is only relevant for
94 // out of process servers and will be treated as a NOP for in process
95 // command buffers.
96 virtual void SynchronizeCommandBuffer() = 0;
piman 2016/01/05 00:28:38 Sorry for the bikeshed, but I would prefer a more
David Yen 2016/01/05 00:47:51 Done.
97
89 // The namespace and command buffer ID forms a unique pair for all existing 98 // The namespace and command buffer ID forms a unique pair for all existing
90 // GpuControl (on client) and matches for the corresponding command buffer 99 // GpuControl (on client) and matches for the corresponding command buffer
91 // (on server) in a single server process. The extra command buffer data can 100 // (on server) in a single server process. The extra command buffer data can
92 // be used for extra identification purposes. One usage is to store some 101 // be used for extra identification purposes. One usage is to store some
93 // extra field to identify unverified sync tokens for the implementation of 102 // extra field to identify unverified sync tokens for the implementation of
94 // the CanWaitUnverifiedSyncToken() function. 103 // the CanWaitUnverifiedSyncToken() function.
95 virtual CommandBufferNamespace GetNamespaceID() const = 0; 104 virtual CommandBufferNamespace GetNamespaceID() const = 0;
96 virtual uint64_t GetCommandBufferID() const = 0; 105 virtual uint64_t GetCommandBufferID() const = 0;
97 virtual int32_t GetExtraCommandBufferData() const = 0; 106 virtual int32_t GetExtraCommandBufferData() const = 0;
98 107
(...skipping 19 matching lines...) Expand all
118 // be enqueued first so does not need to be flushed. 127 // be enqueued first so does not need to be flushed.
119 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; 128 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0;
120 129
121 private: 130 private:
122 DISALLOW_COPY_AND_ASSIGN(GpuControl); 131 DISALLOW_COPY_AND_ASSIGN(GpuControl);
123 }; 132 };
124 133
125 } // namespace gpu 134 } // namespace gpu
126 135
127 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ 136 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698