commit | 1dfc77cc08ee3d3b86c7d1a58b2d5d835d4ad695 | [log] [tgz] |
---|---|---|
author | Robert Phillips <robertphillips@google.com> | Wed Oct 16 16:39:45 2019 -0400 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Wed Oct 16 21:11:12 2019 +0000 |
tree | fc582d3741929b68eb70ea3dbf1a88f1a0aec4ee | |
parent | 77c53087c1ea92bc6c7e436f60746da7605cad98 [diff] [blame] |
Add unit test to exercise GrTextureFreed message handling after a context abandon Bug: 1011368, 1014993 Change-Id: Ie9f7be15b321daa05fcac8109a24e42810f10737 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249008 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp index c7b91b9..6d9a961 100644 --- a/src/gpu/GrResourceCache.cpp +++ b/src/gpu/GrResourceCache.cpp
@@ -635,6 +635,10 @@ } void GrResourceCache::processFreedGpuResources() { + if (!fTexturesAwaitingUnref.count()) { + return; + } + SkTArray<GrTextureFreedMessage> msgs; fFreedTextureInbox.poll(&msgs); for (int i = 0; i < msgs.count(); ++i) {