Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GraphiteTestContext.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2021 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
9
17
18namespace skiatest::graphite {
19
21
23
25 skgpu::graphite::Recording* recording) {
26 TRACE_EVENT0("skia.gpu", TRACE_FUNC);
27 SkASSERT(context);
28 SkASSERT(recording);
29
32 }
33
35
36 // We add an additional ref to the current flush tracker here. This ref is owned by the finish
37 // callback on the flush call. The finish callback will unref the tracker when called.
39
41 info.fRecording = recording;
42 info.fFinishedContext = fFinishTrackers[fCurrentFlushIdx].get();
44 context->insertRecording(info);
45
47
49}
50
63
64} // namespace skiatest::graphite
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213
#define SkASSERT(cond)
Definition SkAssert.h:116
#define TRACE_FUNC
void ref() const
Definition SkRefCnt.h:62
static void FlushFinishedResult(void *finishedContext, skgpu::CallbackResult)
void waitTillFinished(std::function< void()> tick={})
T * get() const
Definition SkRefCnt.h:303
void reset(T *ptr=nullptr)
Definition SkRefCnt.h:310
bool allowCpuSync() const
Definition Caps.h:225
const Caps * caps() const
Definition ContextPriv.h:32
bool submit(SyncToCpu=SyncToCpu::kNo)
Definition Context.cpp:148
bool insertRecording(const InsertRecordingInfo &)
Definition Context.cpp:142
bool hasUnfinishedGpuWork() const
Definition Context.cpp:161
sk_sp< sk_gpu_test::FlushFinishTracker > fFinishTrackers[kMaxFrameLag - 1]
void submitRecordingAndWaitOnSync(skgpu::graphite::Context *, skgpu::graphite::Recording *)
void syncedSubmit(skgpu::graphite::Context *)
#define TRACE_EVENT0(category_group, name)