Flutter Engine
The Flutter Engine
|
#include <Context.h>
Classes | |
class | ContextID |
Protected Member Functions | |
Context (sk_sp< SharedContext >, std::unique_ptr< QueueManager >, const ContextOptions &) | |
Friends | |
class | ContextPriv |
class | ContextCtorAccessor |
|
delete |
|
delete |
Context::~Context | ( | ) |
Definition at line 99 of file Context.cpp.
|
protected |
Definition at line 80 of file Context.cpp.
void Context::asyncRescaleAndReadPixels | ( | const SkImage * | image, |
const SkImageInfo & | dstImageInfo, | ||
const SkIRect & | srcRect, | ||
SkImage::RescaleGamma | rescaleGamma, | ||
SkImage::RescaleMode | rescaleMode, | ||
SkImage::ReadPixelsCallback | callback, | ||
SkImage::ReadPixelsContext | context | ||
) |
Definition at line 245 of file Context.cpp.
void Context::asyncRescaleAndReadPixels | ( | const SkSurface * | surface, |
const SkImageInfo & | dstImageInfo, | ||
const SkIRect & | srcRect, | ||
SkImage::RescaleGamma | rescaleGamma, | ||
SkImage::RescaleMode | rescaleMode, | ||
SkImage::ReadPixelsCallback | callback, | ||
SkImage::ReadPixelsContext | context | ||
) |
Definition at line 257 of file Context.cpp.
void Context::asyncRescaleAndReadPixelsYUV420 | ( | const SkImage * | image, |
SkYUVColorSpace | yuvColorSpace, | ||
sk_sp< SkColorSpace > | dstColorSpace, | ||
const SkIRect & | srcRect, | ||
const SkISize & | dstSize, | ||
SkImage::RescaleGamma | rescaleGamma, | ||
SkImage::RescaleMode | rescaleMode, | ||
SkImage::ReadPixelsCallback | callback, | ||
SkImage::ReadPixelsContext | context | ||
) |
Definition at line 351 of file Context.cpp.
void Context::asyncRescaleAndReadPixelsYUV420 | ( | const SkSurface * | surface, |
SkYUVColorSpace | yuvColorSpace, | ||
sk_sp< SkColorSpace > | dstColorSpace, | ||
const SkIRect & | srcRect, | ||
const SkISize & | dstSize, | ||
SkImage::RescaleGamma | rescaleGamma, | ||
SkImage::RescaleMode | rescaleMode, | ||
SkImage::ReadPixelsCallback | callback, | ||
SkImage::ReadPixelsContext | context | ||
) |
Definition at line 371 of file Context.cpp.
void Context::asyncRescaleAndReadPixelsYUVA420 | ( | const SkImage * | image, |
SkYUVColorSpace | yuvColorSpace, | ||
sk_sp< SkColorSpace > | dstColorSpace, | ||
const SkIRect & | srcRect, | ||
const SkISize & | dstSize, | ||
SkImage::RescaleGamma | rescaleGamma, | ||
SkImage::RescaleMode | rescaleMode, | ||
SkImage::ReadPixelsCallback | callback, | ||
SkImage::ReadPixelsContext | context | ||
) |
Definition at line 396 of file Context.cpp.
void Context::asyncRescaleAndReadPixelsYUVA420 | ( | const SkSurface * | surface, |
SkYUVColorSpace | yuvColorSpace, | ||
sk_sp< SkColorSpace > | dstColorSpace, | ||
const SkIRect & | srcRect, | ||
const SkISize & | dstSize, | ||
SkImage::RescaleGamma | rescaleGamma, | ||
SkImage::RescaleMode | rescaleMode, | ||
SkImage::ReadPixelsCallback | callback, | ||
SkImage::ReadPixelsContext | context | ||
) |
Definition at line 415 of file Context.cpp.
BackendApi Context::backend | ( | ) | const |
Definition at line 130 of file Context.cpp.
void Context::checkAsyncWorkCompletion | ( | ) |
Checks whether any asynchronous work is complete and if so calls related callbacks.
Definition at line 746 of file Context.cpp.
|
inline |
size_t Context::currentBudgetedBytes | ( | ) | const |
Returns the number of bytes of the Context's gpu memory cache budget that are currently in use.
Definition at line 776 of file Context.cpp.
void Context::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 created from this Context. If the BackendTexture is not valid or does not match the BackendApi of the Context 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 750 of file Context.cpp.
void Context::dumpMemoryStatistics | ( | SkTraceMemoryDump * | traceMemoryDump | ) | const |
Enumerates all cached GPU resources owned by the Context and dumps their memory to traceMemoryDump.
Definition at line 786 of file Context.cpp.
void Context::freeGpuResources | ( | ) |
Frees GPU resources created and held by the Context. 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 759 of file Context.cpp.
bool Context::hasUnfinishedGpuWork | ( | ) | const |
Returns true if there is work that was submitted to the GPU that has not finished.
Definition at line 175 of file Context.cpp.
bool Context::insertRecording | ( | const InsertRecordingInfo & | info | ) |
Definition at line 156 of file Context.cpp.
bool Context::isDeviceLost | ( | ) | const |
Returns true if the backend-specific context has gotten into an unrecoverarble, lost state (e.g. if we've gotten a VK_ERROR_DEVICE_LOST in the Vulkan backend).
Definition at line 793 of file Context.cpp.
std::unique_ptr< Recorder > Context::makeRecorder | ( | const RecorderOptions & | options = {} | ) |
Definition at line 132 of file Context.cpp.
size_t Context::maxBudgetedBytes | ( | ) | const |
Returns the size of Context's gpu memory cache budget in bytes.
Definition at line 781 of file Context.cpp.
int Context::maxTextureSize | ( | ) | const |
Returns the maximum texture dimension supported by the underlying backend.
Definition at line 797 of file Context.cpp.
void Context::performDeferredCleanup | ( | std::chrono::milliseconds | msNotUsed | ) |
Purge GPU resources on the Context 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 767 of file Context.cpp.
|
inline |
Definition at line 85 of file ContextPriv.h.
|
inline |
Definition at line 88 of file ContextPriv.h.
bool Context::submit | ( | SyncToCpu | syncToCpu = SyncToCpu::kNo | ) |
Definition at line 162 of file Context.cpp.
bool Context::supportsProtectedContent | ( | ) | const |
Definition at line 801 of file Context.cpp.
|
friend |
|
friend |