Ignore calls to freeGpuResources on abandoned contexts
GPU resources are freed during abandonment and so public calls to this method should be ignored. Bug: skia:10421 Change-Id: I18eb3fbd85cc95c1f2663e109237e5e271a95604 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298346 Auto-Submit: Adlai Holler <adlai@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
43a6e176a6
commit
ebea6d0133
@ -182,6 +182,10 @@ void GrContext::resetContext(uint32_t state) {
|
||||
void GrContext::freeGpuResources() {
|
||||
ASSERT_SINGLE_OWNER
|
||||
|
||||
if (this->abandoned()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: the glyph cache doesn't hold any GpuResources so this call should not be needed here.
|
||||
// Some slack in the GrTextBlob's implementation requires it though. That could be fixed.
|
||||
fStrikeCache->freeAll();
|
||||
|
Loading…
Reference in New Issue
Block a user