diff options
Diffstat (limited to 'src/gpu/vk')
-rw-r--r-- | src/gpu/vk/GrVkRenderTarget.cpp | 9 | ||||
-rw-r--r-- | src/gpu/vk/GrVkRenderTarget.h | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/gpu/vk/GrVkRenderTarget.cpp b/src/gpu/vk/GrVkRenderTarget.cpp index 9ca8a98928..3cab94d7dc 100644 --- a/src/gpu/vk/GrVkRenderTarget.cpp +++ b/src/gpu/vk/GrVkRenderTarget.cpp @@ -352,6 +352,15 @@ void GrVkRenderTarget::onAbandon() { } +#ifdef SK_SUPPORT_LEGACY_BACKEND_OBJECTS +GrBackendObject GrVkRenderTarget::getRenderTargetHandle() const { + // If the render target is multisampled, we currently return the ImageInfo for the resolved + // image. If we only wrap the msaa target (currently not implemented) we should return a handle + // to that instead. + return (GrBackendObject)&fInfo; +} +#endif + GrBackendRenderTarget GrVkRenderTarget::getBackendRenderTarget() const { return GrBackendRenderTarget(this->width(), this->height(), this->numColorSamples(), fInfo, this->grVkImageLayout()); diff --git a/src/gpu/vk/GrVkRenderTarget.h b/src/gpu/vk/GrVkRenderTarget.h index de2317ef06..ed840fc226 100644 --- a/src/gpu/vk/GrVkRenderTarget.h +++ b/src/gpu/vk/GrVkRenderTarget.h @@ -70,6 +70,10 @@ public: return true; } +#ifdef SK_SUPPORT_LEGACY_BACKEND_OBJECTS + GrBackendObject getRenderTargetHandle() const override; +#endif + GrBackendRenderTarget getBackendRenderTarget() const override; void getAttachmentsDescriptor(GrVkRenderPass::AttachmentsDescriptor* desc, |