#include <FlushFinishTracker.h>
Definition at line 24 of file FlushFinishTracker.h.
◆ FlushFinishTracker()
sk_gpu_test::FlushFinishTracker::FlushFinishTracker |
( |
GrDirectContext * |
context | ) |
|
|
inline |
◆ FlushFinished()
static void sk_gpu_test::FlushFinishTracker::FlushFinished |
( |
void * |
finishedContext | ) |
|
|
inlinestatic |
Definition at line 26 of file FlushFinishTracker.h.
26 {
28 tracker->setFinished();
29 tracker->unref();
30 }
FlushFinishTracker(GrDirectContext *context)
◆ FlushFinishedResult()
static void sk_gpu_test::FlushFinishTracker::FlushFinishedResult |
( |
void * |
finishedContext, |
|
|
skgpu::CallbackResult |
|
|
) |
| |
|
inlinestatic |
Definition at line 32 of file FlushFinishTracker.h.
32 {
34 }
static void FlushFinished(void *finishedContext)
◆ setFinished()
void sk_gpu_test::FlushFinishTracker::setFinished |
( |
| ) |
|
|
inline |
◆ waitTillFinished()
void sk_gpu_test::FlushFinishTracker::waitTillFinished |
( |
std::function< void()> |
tick = {} | ) |
|
Definition at line 21 of file FlushFinishTracker.cpp.
21 {
23 auto begin = std::chrono::steady_clock::now();
25 while (!fIsFinished && (end -
begin) < std::chrono::seconds(2)) {
26 if (tick) {
27 tick();
28 }
29 if (fContext) {
31 } else {
32#if defined(SK_GRAPHITE)
34 fGraphiteContext->checkAsyncWorkCompletion();
35#else
37#endif
38 }
39 end = std::chrono::steady_clock::now();
40 }
41 if (!fIsFinished) {
42 SkDebugf(
"WARNING: Wait failed for flush sync. Timings might not be accurate.\n");
43 }
44}
#define SkDEBUGFAIL(message)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
void checkAsyncWorkCompletion()
static const char * begin(const StringSlice &s)
#define TRACE_EVENT0(category_group, name)
The documentation for this class was generated from the following files: