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

Side by Side Diff: gpu/command_buffer/common/sync_token.h

Issue 1394543003: Added SyncToken command buffer trait to help with IPC messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef GPU_COMMAND_BUFFER_COMMON_SYNC_TOKEN_H_
6 #define GPU_COMMAND_BUFFER_COMMON_SYNC_TOKEN_H_
7
8 #include <stdint.h>
9
10 #include "gpu/command_buffer/common/constants.h"
11 #include "gpu/gpu_export.h"
12
13 // From glextchromium.h.
14 #ifndef GL_SYNC_TOKEN_SIZE_CHROMIUM
15 #define GL_SYNC_TOKEN_SIZE_CHROMIUM 24
16 #endif
17
18 namespace gpu {
19
20 // A Sync Token is a binary blob which represents a waitable fence sync
21 // on a particular command buffer namespace and id.
22 // See src/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_sync_point.txt for more
23 // details.
24 struct GPU_EXPORT SyncToken {
25 using Data = int8_t[GL_SYNC_TOKEN_SIZE_CHROMIUM];
26
27 SyncToken();
28 SyncToken(CommandBufferNamespace namespace_id,
29 uint64_t command_buffer_id,
30 uint64_t release_count);
31
32 CommandBufferNamespace GetNamespaceId() const;
33 uint64_t GetCommandBufferId() const;
34 uint64_t GetReleaseCount() const;
35
36 void SetData(CommandBufferNamespace namespace_id,
37 uint64_t command_buffer_id,
38 uint64_t release_count);
39
40 bool operator<(const SyncToken& other) const;
41
42 Data data;
43 };
44
45 } // namespace gpu
46
47 #endif // GPU_COMMAND_BUFFER_COMMON_SYNC_TOKEN_H_
48
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698