Flutter Engine
The Flutter Engine
|
#include <Recorder.h>
Friends | |
class | Context |
class | Device |
class | RecorderPriv |
Definition at line 75 of file Recorder.h.
|
delete |
|
delete |
skgpu::graphite::Recorder::~Recorder | ( | ) |
Definition at line 134 of file Recorder.cpp.
void skgpu::graphite::Recorder::addFinishInfo | ( | const InsertFinishInfo & | info | ) |
Definition at line 432 of file Recorder.cpp.
BackendApi skgpu::graphite::Recorder::backend | ( | ) | const |
Definition at line 157 of file Recorder.cpp.
|
inline |
Definition at line 88 of file Recorder.h.
|
inline |
Definition at line 89 of file Recorder.h.
BackendTexture skgpu::graphite::Recorder::createBackendTexture | ( | SkISize | dimensions, |
const TextureInfo & | info | ||
) |
Creates a new backend gpu texture matching the dimensions and TextureInfo. If an invalid TextureInfo or a TextureInfo Skia can't support is passed in, this will return an invalid BackendTexture. Thus the client should check isValid on the returned BackendTexture to know if it succeeded or not.
If this does return a valid BackendTexture, the caller is required to use Recorder::deleteBackendTexture or Context::deleteBackendTexture to delete the texture. It is safe to use the Context that created this Recorder or any other Recorder created from the same Context to call deleteBackendTexture.
Definition at line 284 of file Recorder.cpp.
size_t skgpu::graphite::Recorder::currentBudgetedBytes | ( | ) | const |
Returns the number of bytes of the Recorder's gpu memory cache budget that are currently in use.
Definition at line 463 of file Recorder.cpp.
void skgpu::graphite::Recorder::deleteBackendTexture | ( | const BackendTexture & | texture | ) |
Called to delete the passed in BackendTexture. This should only be called if the BackendTexture was created by calling Recorder::createBackendTexture on a Recorder that is associated with the same Context. If the BackendTexture is not valid or does not match the BackendApi of the Recorder then nothing happens.
Otherwise this will delete/release the backend object that is wrapped in the BackendTexture. The BackendTexture will be reset to an invalid state and should not be used again.
Definition at line 423 of file Recorder.cpp.
void skgpu::graphite::Recorder::dumpMemoryStatistics | ( | SkTraceMemoryDump * | traceMemoryDump | ) | const |
Enumerates all cached GPU resources owned by the Recorder and dumps their memory to traceMemoryDump.
Definition at line 473 of file Recorder.cpp.
void skgpu::graphite::Recorder::freeGpuResources | ( | ) |
Frees GPU resources created and held by the Recorder. Can be called to reduce GPU memory pressure. Any resources that are still in use (e.g. being used by work submitted to the GPU) will not be deleted by this call. If the caller wants to make sure all resources are freed, then they should first make sure to submit and wait on any outstanding work.
Definition at line 440 of file Recorder.cpp.
SkCanvas * skgpu::graphite::Recorder::makeDeferredCanvas | ( | const SkImageInfo & | imageInfo, |
const TextureInfo & | textureInfo | ||
) |
Definition at line 235 of file Recorder.cpp.
size_t skgpu::graphite::Recorder::maxBudgetedBytes | ( | ) | const |
Returns the size of Recorder's gpu memory cache budget in bytes.
Definition at line 468 of file Recorder.cpp.
void skgpu::graphite::Recorder::performDeferredCleanup | ( | std::chrono::milliseconds | msNotUsed | ) |
Purge GPU resources on the Recorder that haven't been used in the past 'msNotUsed' milliseconds or are otherwise marked for deletion, regardless of whether the context is under budget.
Definition at line 456 of file Recorder.cpp.
|
inline |
Definition at line 106 of file RecorderPriv.h.
|
inline |
Definition at line 110 of file RecorderPriv.h.
std::unique_ptr< Recording > skgpu::graphite::Recorder::snap | ( | ) |
Definition at line 159 of file Recorder.cpp.
bool skgpu::graphite::Recorder::updateBackendTexture | ( | const BackendTexture & | backendTex, |
const SkPixmap | srcData[], | ||
int | numLevels | ||
) |
If possible, updates a backend texture with the provided pixmap data. The client should check the return value to see if the update was successful. The client is required to insert a Recording into the Context and call submit
to send the upload work to the gpu. The backend texture must be compatible with the provided pixmap(s). Compatible, in this case, means that the backend format is compatible with the base pixmap's colortype. The src data can be deleted when this call returns. If the backend texture is mip mapped, the data for all the mipmap levels must be provided. In the mipmapped case all the colortypes of the provided pixmaps must be the same. Additionally, all the miplevels must be sized correctly (please see SkMipmap::ComputeLevelSize and ComputeLevelCount). Note: the pixmap's alphatypes and colorspaces are ignored. For the Vulkan backend after a successful update the layout of the created VkImage will be: VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
Definition at line 314 of file Recorder.cpp.
bool skgpu::graphite::Recorder::updateCompressedBackendTexture | ( | const BackendTexture & | backendTex, |
const void * | data, | ||
size_t | dataSize | ||
) |
If possible, updates a compressed backend texture filled with the provided raw data. The client should check the return value to see if the update was successful. The client is required to insert a Recording into the Context and call submit
to send the upload work to the gpu. If the backend texture is mip mapped, the data for all the mipmap levels must be provided. Additionally, all the miplevels must be sized correctly (please see SkMipMap::ComputeLevelSize and ComputeLevelCount). For the Vulkan backend after a successful update the layout of the created VkImage will be: VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
Definition at line 384 of file Recorder.cpp.
|
friend |
Definition at line 206 of file Recorder.h.
|
friend |
Definition at line 207 of file Recorder.h.
|
friend |
Definition at line 208 of file Recorder.h.