diff --git a/engine/src/flutter/shell/common/engine.cc b/engine/src/flutter/shell/common/engine.cc index 6bb5977ac13..9372f7baa4a 100644 --- a/engine/src/flutter/shell/common/engine.cc +++ b/engine/src/flutter/shell/common/engine.cc @@ -343,11 +343,15 @@ void Engine::OnOutputSurfaceDestroyed(const fxl::Closure& gpu_continuation) { } void Engine::SetViewportMetrics(const blink::ViewportMetrics& metrics) { + bool dimensions_changed = + viewport_metrics_.physical_height != metrics.physical_height || + viewport_metrics_.physical_width != metrics.physical_width; viewport_metrics_ = metrics; if (runtime_) runtime_->SetViewportMetrics(viewport_metrics_); if (animator_) { - animator_->SetDimensionChangePending(); + if (dimensions_changed) + animator_->SetDimensionChangePending(); if (have_surface_) ScheduleFrame(); }