mirrored from https://skia.googlesource.com/skia
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There are two issues fixed here: * In Viewer we don't have a GraphiteTestContext, so check for that. * When running in Xcode with validation enabled, sometimes we get asserts that we're trying to delete an resource used by a MTLCommandBuffer. However, that MTLCommandBuffer is the one we're trying to clean up. Because MTLCommandBuffer objects are assigned to an AutoreleasePool, there may be a second ref on the command buffer object, which won't be released until its pool is drained at some future time. The solution for that is to create a temporary pool at object creation, which will get drained immediately when it leaves scope, releasing that dangling ref. We also have to do this for the CommandEncoders, which apparently have refs to their CommandBuffer. While this doesn't 100% fix the issue it does seem to help some. Change-Id: Ic8684ce05a116389dd9cbadfd7d5128ce8023475 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/836116 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: John Stiles <johnstiles@google.com>
- Loading branch information
Showing
5 changed files
with
48 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters