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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-opaque-background-compositing.html

Issue 2774903003: Fix the compositing of placeholder canvas backgrounds (Closed)
Patch Set: un-dupe function Created 3 years, 9 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/fast/canvas/OffscreenCanvas-opaque-background-compositing-expected.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-opaque-background-compositing.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-opaque-background-compositing.html b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-opaque-background-compositing.html
new file mode 100644
index 0000000000000000000000000000000000000000..80447b97715920b69e3744d345de09527cade5ae
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-opaque-background-compositing.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<style>
+#myCanvas {
+ width: 100%;
+ height: 100%;
+ background-color: rgb(241, 241, 241);
+}
+</style>
+<head>
+ <link rel="stylesheet" type="text/css" href="canvas.css">
+</head>
+<body onload="load()">
+<canvas id="myCanvas"></canvas>
+<script>
+function load() {
+ var myCanvas = document.getElementById("myCanvas");
+ myCanvas.setAttribute("width", 400);
+ myCanvas.setAttribute("height", 400);
+ var offscreenCanvas = myCanvas.transferControlToOffscreen();
+ var offscreen2d = offscreenCanvas.getContext("2d");
+ offscreen2d.clearRect(0, 0, 400, 400);
+ offscreen2d.fillStyle = "green";
+ offscreen2d.fillRect(0, 0, 200, 200);
+ offscreen2d.commit();
+}
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-opaque-background-compositing-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698