Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Unified Diff: third_party/WebKit/LayoutTests/compositing/draws-content/canvas-background-layer.html

Issue 2629083003: Fix box shadow rendering on opaque WebGL canvases (Closed)
Patch Set: fixed tests Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/compositing/draws-content/canvas-background-layer-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/compositing/draws-content/canvas-background-layer.html
diff --git a/third_party/WebKit/LayoutTests/compositing/draws-content/canvas-background-layer.html b/third_party/WebKit/LayoutTests/compositing/draws-content/canvas-background-layer.html
index 35dc8e3a9c52eb89f3ec5ddd720f29e42e8bbf54..42d0593ecbbaada8e3b96de1a8ac97c42e4c4443 100644
--- a/third_party/WebKit/LayoutTests/compositing/draws-content/canvas-background-layer.html
+++ b/third_party/WebKit/LayoutTests/compositing/draws-content/canvas-background-layer.html
@@ -15,7 +15,9 @@
#canvas-border { border: 5px solid; }
#canvas-image { background-image: url("../resources/simple_image.png"); }
#canvas-transparent-background { background-color: rgba(0, 255, 0, 0.5); }
- #canvas-opaque { border: 5px solid; }
+ #canvas-opaque {}
+ #canvas-opaque-border { border: 5px solid; }
+ #canvas-opaque-box-shadow { box-shadow: 10px 10px 0px red; }
</style>
<script>
if (window.testRunner)
@@ -52,11 +54,22 @@
// background color is not opaque.
drawCanvas('canvas-transparent-background', true);
- // Background cannot be direct-composited because of box decoration.
- // However contents of the canvas are opaque so the background does
+ // Contents of the canvas are opaque so the background does
// not need to be painted.
drawCanvas('canvas-opaque', false);
+ // The layer for this canvas is technically opaque because it has
+ // opaque contents and an opque border style, but blink does not
+ // currently analyze border style opacity, so the layer will be
+ // conservatively considered non-opaque. If a future CL causes
+ // this test to fail due to this case being marked as opaque, that
+ // would be an improvement.
+ drawCanvas('canvas-opaque-border', false);
+
+ // The presence of a of a box shadow makes the canvas's layer
+ // non-opaque even though canvas contents are opque.
+ drawCanvas('canvas-opaque-box-shadow', false);
+
if (window.testRunner && window.internals)
document.getElementById('layer-tree').innerText = window.internals.layerTreeAsText(document);
};
@@ -83,6 +96,12 @@
<div class="container">
<canvas id="canvas-opaque" width="50" height="50"></canvas>
</div>
+ <div class="container">
+ <canvas id="canvas-opaque-border" width="50" height="50"></canvas>
+ </div>
+ <div class="container">
+ <canvas id="canvas-opaque-box-shadow" width="50" height="50"></canvas>
+ </div>
<pre id="layer-tree"></pre>
</body>
</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/compositing/draws-content/canvas-background-layer-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698