Revert "canvas2d: Fix canvas resource thrashing with an intermediate canvas."
This reverts commit 16fc868a. Reason for revert: crbug.com/1051940 Original change's description: > canvas2d: Fix canvas resource thrashing with an intermediate canvas. > > If a canvas is used as an intermediate for drawing to the displayed > canvas multiple times in a frame, then a ref to its backing texture is > retained in the displayed canvas' paint recording. This triggers a > copy-on-write and a buffer allocation each time this intermediate canvas > is updated for a new draw. > > The above allocation can be avoided by ordering the GPU work > to write to and read from the intermediate canvas' buffer correctly and > reuse the buffer for each update to this intermediate canvas. > CanvasResourceProviderSharedImage did this optimization earlier by > flushing skia prior to triggering a copy-on-write. But after disabling > deferral for texture backed images, the draw for that texture is never > flushed to skia until the displayed canvas' paint recording is flushed. > > This change brings back the optimization by flushing a canvas' recording > each time a texture backed image is drawn to it. > > R=fserb@chromium.org, bsalomon@google.com > > Bug: 1030108 > Change-Id: Id46fa8399f64a4c724c9f51e5cb4927b7e97d747 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2040028 > Reviewed-by: Fernando Serboncini <fserb@chromium.org> > Reviewed-by: Aaron Krajeski <aaronhk@chromium.org> > Commit-Queue: Fernando Serboncini <fserb@chromium.org> > Auto-Submit: Khushal <khushalsagar@chromium.org> > Cr-Commit-Position: refs/heads/master@{#740005} TBR=bsalomon@google.com,fserb@chromium.org,khushalsagar@chromium.org,aaronhk@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 1030108 Change-Id: I7931a623c4c16dada7dc56f1c78f88aee8da4d96 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2054271Reviewed-by:Khushal <khushalsagar@chromium.org> Reviewed-by:
Aaron Krajeski <aaronhk@chromium.org> Commit-Queue: Khushal <khushalsagar@chromium.org> Cr-Commit-Position: refs/heads/master@{#741151}
Showing
Please register or sign in to comment