Flutter Engine
The Flutter Engine
Public Attributes | List of all members
GrFlushInfo Struct Reference

#include <GrTypes.h>

Public Attributes

size_t fNumSemaphores = 0
 
GrBackendSemaphorefSignalSemaphores = nullptr
 
GrGpuFinishedProc fFinishedProc = nullptr
 
GrGpuFinishedContext fFinishedContext = nullptr
 
GrGpuSubmittedProc fSubmittedProc = nullptr
 
GrGpuSubmittedContext fSubmittedContext = nullptr
 

Detailed Description

Struct to supply options to flush calls.

After issuing all commands, fNumSemaphore semaphores will be signaled by the gpu. The client passes in an array of fNumSemaphores GrBackendSemaphores. In general these GrBackendSemaphore's can be either initialized or not. If they are initialized, the backend uses the passed in semaphore. If it is not initialized, a new semaphore is created and the GrBackendSemaphore object is initialized with that semaphore. The semaphores are not sent to the GPU until the next GrContext::submit call is made. See the GrContext::submit for more information.

The client will own and be responsible for deleting the underlying semaphores that are stored and returned in initialized GrBackendSemaphore objects. The GrBackendSemaphore objects themselves can be deleted as soon as this function returns.

If a finishedProc is provided, the finishedProc will be called when all work submitted to the gpu from this flush call and all previous flush calls has finished on the GPU. If the flush call fails due to an error and nothing ends up getting sent to the GPU, the finished proc is called immediately.

If a submittedProc is provided, the submittedProc will be called when all work from this flush call is submitted to the GPU. If the flush call fails due to an error and nothing will get sent to the GPU, the submitted proc is called immediately. It is possibly that when work is finally submitted, that the submission actual fails. In this case we will not reattempt to do the submission. Skia notifies the client of these via the success bool passed into the submittedProc. The submittedProc is useful to the client to know when semaphores that were sent with the flush have actually been submitted to the GPU so that they can be waited on (or deleted if the submit fails). GrBackendSemaphores are not supported for the GL backend and will be ignored if set.

Definition at line 216 of file GrTypes.h.

Member Data Documentation

◆ fFinishedContext

GrGpuFinishedContext GrFlushInfo::fFinishedContext = nullptr

Definition at line 220 of file GrTypes.h.

◆ fFinishedProc

GrGpuFinishedProc GrFlushInfo::fFinishedProc = nullptr

Definition at line 219 of file GrTypes.h.

◆ fNumSemaphores

size_t GrFlushInfo::fNumSemaphores = 0

Definition at line 217 of file GrTypes.h.

◆ fSignalSemaphores

GrBackendSemaphore* GrFlushInfo::fSignalSemaphores = nullptr

Definition at line 218 of file GrTypes.h.

◆ fSubmittedContext

GrGpuSubmittedContext GrFlushInfo::fSubmittedContext = nullptr

Definition at line 222 of file GrTypes.h.

◆ fSubmittedProc

GrGpuSubmittedProc GrFlushInfo::fSubmittedProc = nullptr

Definition at line 221 of file GrTypes.h.


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