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

Side by Side Diff: tools/gpu/FenceSync.h

Issue 2388433003: skpbench: add option for gpu timing (Closed)
Patch Set: SkAutoTDelete Created 4 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 | « no previous file | tools/gpu/GpuTimer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef FenceSync_DEFINED 8 #ifndef FenceSync_DEFINED
9 #define FenceSync_DEFINED 9 #define FenceSync_DEFINED
10 10
11 #include "SkTypes.h" 11 #include "SkTypes.h"
12 12
13 namespace sk_gpu_test { 13 namespace sk_gpu_test {
14 14
15 using PlatformFence = uint64_t; 15 using PlatformFence = uint64_t;
16 static constexpr PlatformFence kInvalidPlatformFence = 0; 16 static constexpr PlatformFence kInvalidFence = 0;
17 17
18 /* 18 /*
19 * This class provides an interface to interact with fence syncs. A fence sync i s an object that the 19 * This class provides an interface to interact with fence syncs. A fence sync i s an object that the
20 * client can insert into the GPU command stream, and then at any future time, w ait until all 20 * client can insert into the GPU command stream, and then at any future time, w ait until all
21 * commands that were issued before the fence have completed. 21 * commands that were issued before the fence have completed.
22 */ 22 */
23 class FenceSync { 23 class FenceSync {
24 public: 24 public:
25 virtual PlatformFence SK_WARN_UNUSED_RESULT insertFence() const = 0; 25 virtual PlatformFence SK_WARN_UNUSED_RESULT insertFence() const = 0;
26 virtual bool waitFence(PlatformFence) const = 0; 26 virtual bool waitFence(PlatformFence) const = 0;
27 virtual void deleteFence(PlatformFence) const = 0; 27 virtual void deleteFence(PlatformFence) const = 0;
28 28
29 virtual ~FenceSync() {} 29 virtual ~FenceSync() {}
30 }; 30 };
31 31
32 } 32 } // namespace sk_gpu_test
33 33
34 #endif 34 #endif
OLDNEW
« no previous file with comments | « no previous file | tools/gpu/GpuTimer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698