diff options
author | Greg Daniel <egdaniel@google.com> | 2018-04-14 17:29:58 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-14 18:08:12 +0000 |
commit | 7444c3c51887e6aa5324b6fc6aa82768d7830389 (patch) | |
tree | 82f1085cd82c19e50bd566b121445299e8a093e0 /src/gpu/vk | |
parent | 520e578b9987ea99b8ee62b485e941b3d5d96e0f (diff) |
Revert "Delete getRenderTargetHandle call on SkSurface."
This reverts commit c828109ebd1519134b1c3fa168519ac07a31fe05.
Reason for revert: Need to fix flutter
Original change's description:
> Delete getRenderTargetHandle call on SkSurface.
>
> All clients and internal code should be switched (once changes land soon)
> to the new getBackendRenderTarget call instead.
>
> Bug: skia:
> Change-Id: I6f490b6d26a72f37f97216be04e541483206510d
> Reviewed-on: https://skia-review.googlesource.com/121103
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:
Change-Id: I571298f839757fcdedcd8117519e740ac7ef1344
Reviewed-on: https://skia-review.googlesource.com/121480
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
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, |