Flutter Engine
The Flutter Engine
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
55 context->submit(sync);
57 while (context->hasUnfinishedGpuWork()) {
58 this->tick();
59 context->checkAsyncWorkCompletion();
60 }
61 }
62}
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
Definition: SkTraceEvent.h:30
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:232
const Caps * caps() const
Definition: ContextPriv.h:32
bool submit(SyncToCpu=SyncToCpu::kNo)
Definition: Context.cpp:162
bool insertRecording(const InsertRecordingInfo &)
Definition: Context.cpp:156
bool hasUnfinishedGpuWork() const
Definition: Context.cpp:175
sk_sp< sk_gpu_test::FlushFinishTracker > fFinishTrackers[kMaxFrameLag - 1]
void submitRecordingAndWaitOnSync(skgpu::graphite::Context *, skgpu::graphite::Recording *)
void syncedSubmit(skgpu::graphite::Context *)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
#define TRACE_EVENT0(category_group, name)
Definition: trace_event.h:131