Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use compositedDraw when it's needed due to the selected blend mode an…
…d use of shadows. When setting a shadow using properties in canvas, the spec specifies that the shadow has to be composited with the shape that is being painted (see https://html.spec.whatwg.org/#drawing-model). This means that for certain blend modes, CompositedDraw must be used when a shadow is set via properties. The setting of the blend mode was missing before the saveLayer call in CompositedDraw, it has been added. Additionally, a ShouldUseCompositedDraw method has been created to contain the logic of the decision to use CompositedDraw or not in DrawInternal, in order to make the DCHECKs around this conditional clearer, and to facilitate the maintenance of the code as a whole. This new method includes the situations in which, when certain blend modes are used and shadows are set, CompositedDraw must be used to include the compositing operation between the shadow and the shape being painted. The issue this CL fixes can be seen in the change on the expected outcome for the canvas-composite-video-shadow test. The other updated tests are just a rebaseline due to minor differences. Bug: 1348573 Change-Id: Ic5d861bb56124b30db2198d2ef43c4daa14a2ee6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3817461 Reviewed-by: Juanmi Huertas <juanmihd@chromium.org> Reviewed-by: Justin Novosad <junov@chromium.org> Commit-Queue: Andres Perez <andresrperez@google.com> Cr-Commit-Position: refs/heads/main@{#1033489}
- Loading branch information
1 parent
582b21b
commit 54fe105
Showing
41 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+40 Bytes
(100%)
...web_tests/platform/linux/fast/canvas/canvas-composite-shadow-part1-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+218 Bytes
(100%)
...web_tests/platform/linux/fast/canvas/canvas-composite-shadow-part4-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+34 Bytes
(100%)
...atform/linux/virtual/gpu/fast/canvas/canvas-composite-shadow-part2-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9 Bytes
(100%)
...atform/linux/virtual/gpu/fast/canvas/canvas-composite-shadow-part3-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+30 Bytes
(100%)
...atform/linux/virtual/gpu/fast/canvas/canvas-composite-shadow-part4-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+40 Bytes
(100%)
...ual/no-alloc-direct-call/fast/canvas/canvas-composite-shadow-part1-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+218 Bytes
(100%)
...ual/no-alloc-direct-call/fast/canvas/canvas-composite-shadow-part4-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+30 Bytes
(100%)
...ux/virtual/oopr-canvas2d/fast/canvas/canvas-composite-shadow-part2-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-18 Bytes
(100%)
...ux/virtual/oopr-canvas2d/fast/canvas/canvas-composite-shadow-part3-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+24 Bytes
(100%)
...ux/virtual/oopr-canvas2d/fast/canvas/canvas-composite-shadow-part4-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18 Bytes
(100%)
...platform/mac-mac11-arm64/fast/canvas/canvas-composite-shadow-part1-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+697 Bytes
(100%)
...platform/mac-mac11-arm64/fast/canvas/canvas-composite-video-shadow-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18 Bytes
(100%)
...ual/no-alloc-direct-call/fast/canvas/canvas-composite-shadow-part1-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+697 Bytes
(100%)
...ual/no-alloc-direct-call/fast/canvas/canvas-composite-video-shadow-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18 Bytes
(100%)
...platform/mac-mac12-arm64/fast/canvas/canvas-composite-shadow-part1-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+697 Bytes
(100%)
...platform/mac-mac12-arm64/fast/canvas/canvas-composite-video-shadow-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18 Bytes
(100%)
...ual/no-alloc-direct-call/fast/canvas/canvas-composite-shadow-part1-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+697 Bytes
(100%)
...ual/no-alloc-direct-call/fast/canvas/canvas-composite-video-shadow-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+43 Bytes
(100%)
...k/web_tests/platform/mac/fast/canvas/canvas-composite-shadow-part1-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+213 Bytes
(100%)
...k/web_tests/platform/mac/fast/canvas/canvas-composite-shadow-part4-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+699 Bytes
(100%)
...k/web_tests/platform/mac/fast/canvas/canvas-composite-video-shadow-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+35 Bytes
(100%)
...platform/mac/virtual/gpu/fast/canvas/canvas-composite-shadow-part2-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+11 Bytes
(100%)
...platform/mac/virtual/gpu/fast/canvas/canvas-composite-shadow-part3-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+28 Bytes
(100%)
...platform/mac/virtual/gpu/fast/canvas/canvas-composite-shadow-part4-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+762 Bytes
(100%)
...platform/mac/virtual/gpu/fast/canvas/canvas-composite-video-shadow-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+35 Bytes
(100%)
...ac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-shadow-part2-expected.png
Oops, something went wrong.
Binary file modified
BIN
+11 Bytes
(100%)
...ac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-shadow-part3-expected.png
Oops, something went wrong.
Binary file modified
BIN
+28 Bytes
(100%)
...ac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-shadow-part4-expected.png
Oops, something went wrong.
Binary file modified
BIN
+468 Bytes
(100%)
...ac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png
Oops, something went wrong.
Binary file modified
BIN
+42 Bytes
(100%)
...k/web_tests/platform/win/fast/canvas/canvas-composite-shadow-part1-expected.png
Oops, something went wrong.
Binary file modified
BIN
+207 Bytes
(100%)
...k/web_tests/platform/win/fast/canvas/canvas-composite-shadow-part4-expected.png
Oops, something went wrong.
Binary file modified
BIN
+752 Bytes
(100%)
...k/web_tests/platform/win/fast/canvas/canvas-composite-video-shadow-expected.png
Oops, something went wrong.
Binary file modified
BIN
+34 Bytes
(100%)
...platform/win/virtual/gpu/fast/canvas/canvas-composite-shadow-part2-expected.png
Oops, something went wrong.
Binary file modified
BIN
+10 Bytes
(100%)
...platform/win/virtual/gpu/fast/canvas/canvas-composite-shadow-part3-expected.png
Oops, something went wrong.
Binary file modified
BIN
+35 Bytes
(100%)
...platform/win/virtual/gpu/fast/canvas/canvas-composite-shadow-part4-expected.png
Oops, something went wrong.
Binary file modified
BIN
+641 Bytes
(100%)
...platform/win/virtual/gpu/fast/canvas/canvas-composite-video-shadow-expected.png
Oops, something went wrong.
Binary file modified
BIN
+34 Bytes
(100%)
...in/virtual/oopr-canvas2d/fast/canvas/canvas-composite-shadow-part2-expected.png
Oops, something went wrong.
Binary file modified
BIN
+10 Bytes
(100%)
...in/virtual/oopr-canvas2d/fast/canvas/canvas-composite-shadow-part3-expected.png
Oops, something went wrong.
Binary file modified
BIN
+35 Bytes
(100%)
...in/virtual/oopr-canvas2d/fast/canvas/canvas-composite-shadow-part4-expected.png
Oops, something went wrong.
Binary file modified
BIN
+429 Bytes
(100%)
...in/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png
Oops, something went wrong.