Have GrMtlTexture and GrMtlRenderTarget call parents onRelease/Abandon.

Bug: skia:
Change-Id: Ib7c19f4a1951f7463912b78c18ed7f2839833193
Reviewed-on: https://skia-review.googlesource.com/c/189485
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Greg Daniel 2019-02-05 09:40:21 -05:00 committed by Skia Commit-Bot
parent 0c74d7d928
commit c91162d20b
3 changed files with 6 additions and 0 deletions

View File

@ -82,6 +82,8 @@ private:
bool completeStencilAttachment() override;
void onSetRelease(sk_sp<GrReleaseProcHelper> releaseHelper) override {}
typedef GrRenderTarget INHERITED;
};

View File

@ -66,11 +66,13 @@ GrMtlGpu* GrMtlRenderTarget::getMtlGpu() const {
void GrMtlRenderTarget::onAbandon() {
fRenderTexture = nil;
fResolveTexture = nil;
INHERITED::onAbandon();
}
void GrMtlRenderTarget::onRelease() {
fRenderTexture = nil;
fResolveTexture = nil;
INHERITED::onRelease();
}
bool GrMtlRenderTarget::completeStencilAttachment() {

View File

@ -49,9 +49,11 @@ protected:
void onAbandon() override {
fTexture = nil;
INHERITED::onAbandon();
}
void onRelease() override {
fTexture = nil;
INHERITED::onRelease();
}
bool onStealBackendTexture(GrBackendTexture*, SkImage::BackendTextureReleaseProc*) override {