Flutter Engine
The Flutter Engine
Public Attributes | List of all members
skgpu::graphite::InsertRecordingInfo Struct Reference

#include <GraphiteTypes.h>

Public Attributes

RecordingfRecording = nullptr
 
SkSurfacefTargetSurface = nullptr
 
SkIVector fTargetTranslation = {0, 0}
 
MutableTextureStatefTargetTextureState = nullptr
 
size_t fNumWaitSemaphores = 0
 
BackendSemaphorefWaitSemaphores = nullptr
 
size_t fNumSignalSemaphores = 0
 
BackendSemaphorefSignalSemaphores = nullptr
 
GpuFinishedContext fFinishedContext = nullptr
 
GpuFinishedProc fFinishedProc = nullptr
 

Detailed Description

The fFinishedProc is called when the Recording has been submitted and finished on the GPU, or when there is a failure that caused it not to be submitted. The callback will always be called and the caller can use the callback to know it is safe to free any resources associated with the Recording that they may be holding onto. If the Recording is successfully submitted to the GPU the callback will be called with CallbackResult::kSuccess once the GPU has finished. All other cases where some failure occured it will be called with CallbackResult::kFailed.

The fTargetSurface, if provided, is used as a target for any draws recorded onto a deferred canvas returned from Recorder::makeDeferredCanvas. This target surface must be provided iff the Recording contains any such draws. It must be Graphite-backed and its backing texture's TextureInfo must match the info provided to the Recorder when making the deferred canvas.

fTargetTranslation is an additional translation applied to draws targeting fTargetSurface.

The client may pass in two arrays of initialized BackendSemaphores to be included in the command stream. At some time before issuing commands in the Recording, the fWaitSemaphores will be waited on by the gpu. We only guarantee these wait semaphores block transfer and fragment shader work. Similarly, at some time after issuing the Recording's commands, the fSignalSemaphores will be signaled by the gpu. Depending on the platform, the timing of the wait and signal operations will either be immediately before or after the given Recording's command stream, respectively, or before and after the entire CommandBuffer's command stream. The semaphores are not sent to the GPU until the next Context::submit call is made.

The client will own and be responsible for deleting the underlying semaphore objects after the submission completes, however the BackendSemaphore objects themselves can be deleted as soon as this function returns.

Definition at line 60 of file GraphiteTypes.h.

Member Data Documentation

◆ fFinishedContext

GpuFinishedContext skgpu::graphite::InsertRecordingInfo::fFinishedContext = nullptr

Definition at line 72 of file GraphiteTypes.h.

◆ fFinishedProc

GpuFinishedProc skgpu::graphite::InsertRecordingInfo::fFinishedProc = nullptr

Definition at line 73 of file GraphiteTypes.h.

◆ fNumSignalSemaphores

size_t skgpu::graphite::InsertRecordingInfo::fNumSignalSemaphores = 0

Definition at line 69 of file GraphiteTypes.h.

◆ fNumWaitSemaphores

size_t skgpu::graphite::InsertRecordingInfo::fNumWaitSemaphores = 0

Definition at line 67 of file GraphiteTypes.h.

◆ fRecording

Recording* skgpu::graphite::InsertRecordingInfo::fRecording = nullptr

Definition at line 61 of file GraphiteTypes.h.

◆ fSignalSemaphores

BackendSemaphore* skgpu::graphite::InsertRecordingInfo::fSignalSemaphores = nullptr

Definition at line 70 of file GraphiteTypes.h.

◆ fTargetSurface

SkSurface* skgpu::graphite::InsertRecordingInfo::fTargetSurface = nullptr

Definition at line 63 of file GraphiteTypes.h.

◆ fTargetTextureState

MutableTextureState* skgpu::graphite::InsertRecordingInfo::fTargetTextureState = nullptr

Definition at line 65 of file GraphiteTypes.h.

◆ fTargetTranslation

SkIVector skgpu::graphite::InsertRecordingInfo::fTargetTranslation = {0, 0}

Definition at line 64 of file GraphiteTypes.h.

◆ fWaitSemaphores

BackendSemaphore* skgpu::graphite::InsertRecordingInfo::fWaitSemaphores = nullptr

Definition at line 68 of file GraphiteTypes.h.


The documentation for this struct was generated from the following file: