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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style type="text/css">
5 .container {
6 width: 60px;
7 height: 60px;
8 }
9 #canvas-simple {
10 /* No box decorations or background image. */
11 /* Solid color background only. */
12 background-color: green;
13 }
14 </style>
15 <script>
16 if (window.testRunner)
17 testRunner.overridePreference("WebKitWebGLEnabled", "1");
18
19 function drawCanvas(canvasID) {
20 var canvas = document.getElementById(canvasID);
21 var gl = canvas.getContext("experimental-webgl");
22 gl.clearColor(0, 0, 0, 0);
23 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
24 };
25
26 function doTest() {
27 // Simple background can be direct-composited with content-layer.
28 // The container GraphicsLayer does not paint anything.
29 drawCanvas('canvas-simple');
30 };
31 window.addEventListener('load', doTest, false);
32 </script>
33 </head>
34
35 <body>
36 <div class="container">
37 <canvas id="canvas-simple" width="50" height="50"></canvas>
38 </div>
39 </body>
40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698