mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
# Description This PR fixes the `gl_populate_existing_damage` in embedder.cc, which currently returns an empty rectangle when a full repaint is needed. This leads to the `frame_damage` being considered empty in rasterizer.cc, causing incorrect partial repaint within Flutter when `gl_populate_existing_damage` is not provided by the embedder. # Related Issue https://github.com/flutter/flutter/issues/119601 # Tests Add a new test. Also fixes damage calculation related tests in EmbedderTest by * Use a new Dart embedder fixture entry point `render_gradient_retained` which retains the old layer to make sure layer tree diff happens. * Add `latch.Wait()` after `SetGLPresentCallback` to make sure assertions have been executed. * Make `existing_damage_rects` static since it should be valid after `populate_existing_damage` returns.