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

Unified Diff: LayoutTests/compositing/draws-content/webgl-simple-background.html

Issue 19543014: Direct composite canvas background if possible. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: re-uploading patch Created 7 years, 5 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
Index: LayoutTests/compositing/draws-content/webgl-simple-background.html
diff --git a/LayoutTests/compositing/draws-content/webgl-simple-background.html b/LayoutTests/compositing/draws-content/webgl-simple-background.html
new file mode 100644
index 0000000000000000000000000000000000000000..bea206288bfd4e9c67a6ff3b410484ddccdace18
--- /dev/null
+++ b/LayoutTests/compositing/draws-content/webgl-simple-background.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+ .container {
+ width: 60px;
+ height: 60px;
+ }
+ #canvas-simple {
+ /* No box decorations or background image. */
+ /* Solid color background only. */
+ background-color: green;
+ }
+ </style>
+ <script>
+ if (window.testRunner)
+ testRunner.overridePreference("WebKitWebGLEnabled", "1");
+
+ function drawCanvas(canvasID) {
+ var canvas = document.getElementById(canvasID);
+ var gl = canvas.getContext("experimental-webgl");
+ gl.clearColor(0, 0, 0, 0);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ };
+
+ function doTest() {
+ // Simple background can be direct-composited with content-layer.
+ // The container GraphicsLayer does not paint anything.
+ drawCanvas('canvas-simple');
+ };
+ window.addEventListener('load', doTest, false);
+ </script>
+ </head>
+
+ <body>
+ <div class="container">
+ <canvas id="canvas-simple" width="50" height="50"></canvas>
+ </div>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698