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/mock | |
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/mock')
-rw-r--r-- | src/gpu/mock/GrMockTexture.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gpu/mock/GrMockTexture.h b/src/gpu/mock/GrMockTexture.h index 571b9cafd6..071b4f4615 100644 --- a/src/gpu/mock/GrMockTexture.h +++ b/src/gpu/mock/GrMockTexture.h @@ -120,6 +120,12 @@ public: return {this->width(), this->height(), this->numColorSamples(), numStencilBits, fInfo}; } +#ifdef SK_SUPPORT_LEGACY_BACKEND_OBJECTS + GrBackendObject getRenderTargetHandle() const override { + return reinterpret_cast<GrBackendObject>(&fInfo); + } +#endif + protected: // constructor for subclasses GrMockRenderTarget(GrMockGpu* gpu, const GrSurfaceDesc& desc, @@ -154,6 +160,10 @@ public: this->registerWithCacheWrapped(); } +#ifdef SK_SUPPORT_LEGACY_BACKEND_OBJECTS + GrBackendObject getRenderTargetHandle() const override { return 0; } +#endif + GrTexture* asTexture() override { return this; } GrRenderTarget* asRenderTarget() override { return this; } const GrTexture* asTexture() const override { return this; } |