46 if (!resourceProvider) {
57 SkASSERT(!rt->getUniqueKey().isValid());
103 if (!fCachedCanvas) {
104 fCachedCanvas = std::make_unique<SkCanvas>(fDevice);
106 return fCachedCanvas.get();
113 dContext->priv().flushSurface(fDevice->
targetProxy());
120 bool deleteSemaphoresAfterWait) {
121 return fDevice->
wait(numSemaphores, waitSemaphores, deleteSemaphoresAfterWait);
125 fCachedCanvas.reset();
141 size_t maxResourceBytes = direct->getResourceCacheLimit();
150 characterization->set(direct->threadSafeProxy(),
175 if (!characterization.
isValid()) {
179 if (!characterization.vulkanSecondaryCBCompatible()) {
183 if (characterization.isTextureable()) {
188 if (characterization.usesGLFBO0()) {
201 size_t maxResourceBytes = dContext->getResourceCacheLimit();
209 characterization.cacheMaxResourceBytes() <= maxResourceBytes &&
210 characterization.origin() == readSurfaceView.
origin() &&
211 characterization.backendFormat() ==
format &&
217 characterization.isProtected() == isProtected &&
218 characterization.surfaceProps() == fDevice->
surfaceProps();
221#ifndef SK_DDL_IS_UNIQUE_POINTER
static GrDirectContext * GrAsDirectContext(GrContext_Base *base)
static constexpr GrColorType SkColorTypeToGrColorType(SkColorType ct)
@ kTopLeft_GrSurfaceOrigin
@ kUnknown_SkColorType
uninitialized
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
static SkSurfaceProps SkSurfacePropsCopyOrDefault(const SkSurfaceProps *props)
virtual bool isFormatAsColorTypeRenderable(GrColorType ct, const GrBackendFormat &format, int sampleCount=1) const =0
bool matches(GrContext_Base *candidate) const
GrContextThreadSafeProxyPriv priv()
virtual GrDirectContext * asDirectContext()
SK_API GrBackendApi backend() const
SK_API const GrSurfaceCharacterization & characterization() const
GrResourceProvider * resourceProvider() const
const GrCaps * caps() const
GrProxyProvider * proxyProvider()
sk_sp< skgpu::ganesh::Device > createDevice(GrColorType, sk_sp< GrSurfaceProxy >, sk_sp< SkColorSpace >, GrSurfaceOrigin, const SkSurfaceProps &, skgpu::ganesh::Device::InitContents)
GrRecordingContextPriv priv()
sk_sp< GrRenderTarget > wrapVulkanSecondaryCBAsRenderTarget(const SkImageInfo &, const GrVkDrawableInfo &)
SkColorSpace * colorSpace() const
GrContextThreadSafeProxy * contextInfo() const
SkColorType colorType() const
VkRTSupportsInputAttachment
VulkanSecondaryCBCompatible
GrTextureProxy * asTextureProxy() const
GrSurfaceOrigin origin() const
GrRenderTargetProxy * asRenderTargetProxy() const
sk_sp< GrRenderTargetProxy > asRenderTargetProxyRef() const
GrProtected isProtected() const
const GrBackendFormat & backendFormat() const
bool isInstantiated() const
bool draw(sk_sp< const GrDeferredDisplayList > deferredDisplayList)
bool isCompatible(const GrSurfaceCharacterization &characterization) const
static sk_sp< GrVkSecondaryCBDrawContext > Make(GrRecordingContext *, const SkImageInfo &, const GrVkDrawableInfo &, const SkSurfaceProps *props)
const SkSurfaceProps & props() const
~GrVkSecondaryCBDrawContext() override
bool wait(int numSemaphores, const GrBackendSemaphore waitSemaphores[], bool deleteSemaphoresAfterWait=true)
bool characterize(GrSurfaceCharacterization *characterization) const
SkColorSpace * colorSpace() const
static bool Equals(const SkColorSpace *, const SkColorSpace *)
const SkImageInfo & imageInfo() const
const SkSurfaceProps & surfaceProps() const
void reset(T *ptr=nullptr)
GrSurfaceProxyView readSurfaceView()
GrRenderTargetProxy * targetProxy()
bool wait(int numSemaphores, const GrBackendSemaphore *waitSemaphores, bool deleteSemaphoresAfterWait)
GrRecordingContext * recordingContext() const override
uint32_t uint32_t * format
const SkColorInfo & colorInfo() const
sk_sp< SkColorSpace > refColorSpace() const
SkColorType colorType() const