Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[composite-bgcolor-animation] Return empty result when PaintWorkletIn…
…put not found The root cause of the problem is that there is an early exit in the DiscardableImageMap::GatherDiscardableImages(), happening when the paint rect for the op is empty. This makes sense because there is nothing to draw. Note that this is different than the empty element case. In fact, we already have "background-color-animation-zero-size-element.html" under css-backgrounds/animations/ and there is no problem with that. The bug happens when the element is not empty, but its intersection with the SkCanvas that it draws into is empty. Please see the notes in this doc for more details: https://docs.google.com/document/d/1Da9d7ai5xt4nPX7NDZnqaaTSoFitRSeYxw1qxGjtdeQ/edit The |PaintWorkletImageProvider::records_| contains the records for all the discardable images that can draw. Meaning that the ones that early exits won't be included in the |records_|. But, when the PaintWorkletImageProvider::GetPaintRecordResult() is called, the input parameter |PaintWorkletInput| would contain all possible PaintWorkletInput that is passed from Blink to CC, which obviously contains the ones that cannot draw. As a result, these PaintWorkletInputs won't exists in the |records_|. We handle these cases by returning an empty record because there is nothing to draw (like empty container cases). Bug: 1216210 Change-Id: I9630aa4b55fd1322f641f42b05c20aab8c7234c7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2954479 Reviewed-by: Philip Rogers <pdr@chromium.org> Reviewed-by: Robert Flack <flackr@chromium.org> Commit-Queue: Xida Chen <xidachen@chromium.org> Cr-Commit-Position: refs/heads/master@{#894050}
- Loading branch information