Metal: re-enable retained references.
A client of Flutter is seeing a crash when trying to release the MTLTexture in GrMtlAttachment. The range of CLs involved includes the one that disables retained references in the command buffer, so this is a speculative change to see if that is the culprit. Change-Id: Idd6e6b264086d671be52f456ef56f1fc5bafade8 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444498 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
parent
6b4f68b2fe
commit
79ff8f20bf
@ -51,8 +51,9 @@ public:
|
||||
}
|
||||
|
||||
void addResource(sk_sp<const GrManagedResource> resource) {
|
||||
SkASSERT(resource);
|
||||
fTrackedResources.push_back(std::move(resource));
|
||||
// Disable generic resource tracking for now
|
||||
// SkASSERT(resource);
|
||||
// fTrackedResources.push_back(std::move(resource));
|
||||
}
|
||||
|
||||
void addGrBuffer(sk_sp<const GrBuffer> buffer) {
|
||||
|
@ -22,7 +22,7 @@ GR_NORETAIN_BEGIN
|
||||
|
||||
sk_sp<GrMtlCommandBuffer> GrMtlCommandBuffer::Make(id<MTLCommandQueue> queue) {
|
||||
id<MTLCommandBuffer> mtlCommandBuffer;
|
||||
mtlCommandBuffer = [queue commandBufferWithUnretainedReferences];
|
||||
mtlCommandBuffer = [queue commandBuffer];
|
||||
if (nil == mtlCommandBuffer) {
|
||||
return nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user