commit | ee5194e15276aab0b7709abb41be6ae5260c9508 | [log] [tgz] |
---|---|---|
author | Jim Van Verth <jvanverth@google.com> | Thu Aug 04 10:50:48 2022 -0400 |
committer | SkCQ <skcq-be@skia-corp.google.com.iam.gserviceaccount.com> | Thu Aug 04 15:32:48 2022 +0000 |
tree | 99bbe3d31e6e952688c1272c14e0aef5b607b9d8 | |
parent | 3531dca053a42637d3cee5d70c799f15510422a5 [diff] |
[Metal] Add one missing label Bug: skia:13446 Change-Id: I8c16561c62ea0defa408387c8a9b3dd0774c784e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/565637 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/ganesh/mtl/GrMtlAttachment.h b/src/gpu/ganesh/mtl/GrMtlAttachment.h index 8af03ec..95f850f 100644 --- a/src/gpu/ganesh/mtl/GrMtlAttachment.h +++ b/src/gpu/ganesh/mtl/GrMtlAttachment.h
@@ -87,6 +87,8 @@ GrMtlGpu* getMtlGpu() const; + void onSetLabel() override; + id<MTLTexture> fTexture; };
diff --git a/src/gpu/ganesh/mtl/GrMtlAttachment.mm b/src/gpu/ganesh/mtl/GrMtlAttachment.mm index 6e71eb4..86fd7c7 100644 --- a/src/gpu/ganesh/mtl/GrMtlAttachment.mm +++ b/src/gpu/ganesh/mtl/GrMtlAttachment.mm
@@ -178,4 +178,11 @@ return static_cast<GrMtlGpu*>(this->getGpu()); } +void GrMtlAttachment::onSetLabel() { + SkASSERT(fTexture); + if (!this->getLabel().empty()) { + NSString* labelStr = @(this->getLabel().c_str()); + fTexture.label = [@"_Skia_" stringByAppendingString:labelStr]; + } +} GR_NORETAIN_END