Flutter Engine
The Flutter Engine
|
#include <GraphiteTestContext.h>
Public Member Functions | |
GraphiteTestContext (const GraphiteTestContext &)=delete | |
GraphiteTestContext & | operator= (const GraphiteTestContext &)=delete |
virtual | ~GraphiteTestContext () |
virtual skgpu::BackendApi | backend ()=0 |
virtual skgpu::ContextType | contextType ()=0 |
virtual std::unique_ptr< skgpu::graphite::Context > | makeContext (const TestOptions &)=0 |
bool | getMaxGpuFrameLag (int *maxFrameLag) const |
void | submitRecordingAndWaitOnSync (skgpu::graphite::Context *, skgpu::graphite::Recording *) |
virtual void | tick () |
void | syncedSubmit (skgpu::graphite::Context *) |
Protected Member Functions | |
GraphiteTestContext () | |
Protected Attributes | |
sk_sp< sk_gpu_test::FlushFinishTracker > | fFinishTrackers [kMaxFrameLag - 1] |
int | fCurrentFlushIdx = 0 |
Static Protected Attributes | |
static constexpr int | kMaxFrameLag = 3 |
An offscreen 3D context. This class is intended for Skia's internal testing needs and not for general use.
Definition at line 34 of file GraphiteTestContext.h.
|
delete |
|
virtual |
Definition at line 22 of file GraphiteTestContext.cpp.
|
protected |
Definition at line 20 of file GraphiteTestContext.cpp.
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 47 of file GraphiteTestContext.h.
|
pure virtual |
|
delete |
void skiatest::graphite::GraphiteTestContext::submitRecordingAndWaitOnSync | ( | skgpu::graphite::Context * | context, |
skgpu::graphite::Recording * | recording | ||
) |
This will insert a Recording and submit work to the GPU. Additionally, we will add a finished callback to our insert recording call. We allow ourselves to have kMaxFrameLag number of unfinished flushes active on the GPU at a time. If we have 2 outstanding flushes then we will wait on the CPU until one has finished.
Definition at line 24 of file GraphiteTestContext.cpp.
void skiatest::graphite::GraphiteTestContext::syncedSubmit | ( | skgpu::graphite::Context * | context | ) |
If the context supports CPU/GPU sync'ing this calls submit with skgpu::SyncToCpu::kYes. Otherwise it calls it with kNo in a busy loop.
Definition at line 51 of file GraphiteTestContext.cpp.
|
inlinevirtual |
Allow the GPU API to make or detect forward progress on submitted work. For most APIs this is a no-op as the API can do this on another thread.
Reimplemented in skiatest::graphite::DawnTestContext.
Definition at line 64 of file GraphiteTestContext.h.
|
protected |
Definition at line 76 of file GraphiteTestContext.h.
|
protected |
Definition at line 75 of file GraphiteTestContext.h.
|
staticconstexprprotected |
Definition at line 73 of file GraphiteTestContext.h.