From 8c0b89b1f42da35b6893d4d38079c93b54b8604b Mon Sep 17 00:00:00 2001 From: Dan Field Date: Tue, 11 Aug 2020 14:01:01 -0700 Subject: [PATCH] Use performDeferredCleanup instead of freeGpuResources (flutter/engine#20413) --- engine/src/flutter/shell/common/rasterizer.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/engine/src/flutter/shell/common/rasterizer.cc b/engine/src/flutter/shell/common/rasterizer.cc index c9514c2ac0..709d5495ba 100644 --- a/engine/src/flutter/shell/common/rasterizer.cc +++ b/engine/src/flutter/shell/common/rasterizer.cc @@ -99,15 +99,17 @@ void Rasterizer::Teardown() { void Rasterizer::NotifyLowMemoryWarning() const { if (!surface_) { - FML_DLOG(INFO) << "Rasterizer::PurgeCaches called with no surface."; + FML_DLOG(INFO) + << "Rasterizer::NotifyLowMemoryWarning called with no surface."; return; } auto context = surface_->GetContext(); if (!context) { - FML_DLOG(INFO) << "Rasterizer::PurgeCaches called with no GrContext."; + FML_DLOG(INFO) + << "Rasterizer::NotifyLowMemoryWarning called with no GrContext."; return; } - context->freeGpuResources(); + context->performDeferredCleanup(std::chrono::milliseconds(0)); } flutter::TextureRegistry* Rasterizer::GetTextureRegistry() {