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

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

Issue 1489573003: Added an extra sync token field for extra command buffer identification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return False on invalid stream id Created 5 years 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // the GPU implementation if it is to be used from multiple threads. This 80 // the GPU implementation if it is to be used from multiple threads. This
81 // may not be supported with all implementations. 81 // may not be supported with all implementations.
82 virtual void SetLock(base::Lock*) = 0; 82 virtual void SetLock(base::Lock*) = 0;
83 83
84 // Returns true if the channel to the Gpu is lost. When true, all contexts 84 // Returns true if the channel to the Gpu is lost. When true, all contexts
85 // should be considered as lost. 85 // should be considered as lost.
86 virtual bool IsGpuChannelLost() = 0; 86 virtual bool IsGpuChannelLost() = 0;
87 87
88 // The namespace and command buffer ID forms a unique pair for all existing 88 // The namespace and command buffer ID forms a unique pair for all existing
89 // GpuControl (on client) and matches for the corresponding command buffer 89 // GpuControl (on client) and matches for the corresponding command buffer
90 // (on server) in a single server process. 90 // (on server) in a single server process. The extra command buffer data can
91 // be used for extra identification purposes. One usage is to store some
92 // extra field to identify unverified sync tokens for the implementation of
93 // the CanWaitUnverifiedSyncToken() function.
91 virtual CommandBufferNamespace GetNamespaceID() const = 0; 94 virtual CommandBufferNamespace GetNamespaceID() const = 0;
92 virtual uint64_t GetCommandBufferID() const = 0; 95 virtual uint64_t GetCommandBufferID() const = 0;
96 virtual int32_t GetExtraCommandBufferData() const = 0;
93 97
94 // Fence Syncs use release counters at a context level, these fence syncs 98 // Fence Syncs use release counters at a context level, these fence syncs
95 // need to be flushed before they can be shared with other contexts across 99 // need to be flushed before they can be shared with other contexts across
96 // channels. Subclasses should implement these functions and take care of 100 // channels. Subclasses should implement these functions and take care of
97 // figuring out when a fence sync has been flushed. The difference between 101 // figuring out when a fence sync has been flushed. The difference between
98 // IsFenceSyncFlushed and IsFenceSyncFlushReceived, one is testing is the 102 // IsFenceSyncFlushed and IsFenceSyncFlushReceived, one is testing is the
99 // client has issued the flush, and the other is testing if the service 103 // client has issued the flush, and the other is testing if the service
100 // has received the flush. 104 // has received the flush.
101 virtual uint64_t GenerateFenceSyncRelease() = 0; 105 virtual uint64_t GenerateFenceSyncRelease() = 0;
102 virtual bool IsFenceSyncRelease(uint64_t release) = 0; 106 virtual bool IsFenceSyncRelease(uint64_t release) = 0;
(...skipping 10 matching lines...) Expand all
113 // be enqueued first so does not need to be flushed. 117 // be enqueued first so does not need to be flushed.
114 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; 118 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0;
115 119
116 private: 120 private:
117 DISALLOW_COPY_AND_ASSIGN(GpuControl); 121 DISALLOW_COPY_AND_ASSIGN(GpuControl);
118 }; 122 };
119 123
120 } // namespace gpu 124 } // namespace gpu
121 125
122 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ 126 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_unittest.cc ('k') | gpu/command_buffer/common/constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698