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

Unified Diff: content/test/data/gpu/pixel_acceleratedOffscreen2d_commit_main.html

Issue 2359723003: Implement OffscreenCanvas Accelerated 2D commit() (Closed)
Patch Set: Temporary code for Unaccelerated case Created 4 years, 3 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: content/test/data/gpu/pixel_acceleratedOffscreen2d_commit_main.html
diff --git a/content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_main.html b/content/test/data/gpu/pixel_acceleratedOffscreen2d_commit_main.html
similarity index 72%
copy from content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_main.html
copy to content/test/data/gpu/pixel_acceleratedOffscreen2d_commit_main.html
index 3ae0e56c24d2c1864f35277dbaa6b75ff33191d1..a058967ed1acb757d77d3abfd0778266a4b5a6e0 100644
--- a/content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_main.html
+++ b/content/test/data/gpu/pixel_acceleratedOffscreen2d_commit_main.html
@@ -8,7 +8,7 @@ that the baseline images are regenerated on the next run.
<html>
<head>
-<title>OffscreenCanvas commit flow on main thread: green square on white background.</title>
+<title>OffscreenCanvas 2d commit flow on main thread: green square on white background.</title>
<style type="text/css">
.nomargin {
margin: 0px auto;
@@ -27,10 +27,10 @@ function draw()
{
var canvas = document.getElementById("c");
var offscreenCanvas = canvas.transferControlToOffscreen();
- var gl = offscreenCanvas.getContext("webgl");
- gl.clearColor(0.0, 1.0, 0.0, 1.0);
- gl.clear(gl.COLOR_BUFFER_BIT);
- gl.commit();
+ var ctx2d = offscreenCanvas.getContext("2d");
+ ctx2d.fillStyle = "green";
+ ctx2d.fillRect(0, 0, offscreenCanvas.width, offscreenCanvas.height);
+ ctx2d.commit();
}
function waitForFinish()
@@ -47,10 +47,10 @@ function waitForFinish()
</script>
</head>
<body onload="main()">
-<div style="position:relative; width:200px; height:200px; background-color:white">
+<div style="position:relative; width:350px; height:350px; background-color:white">
</div>
<div id="container" style="position:absolute; top:0px; left:0px">
-<canvas id="c" width="200" height="200" class="nomargin"></canvas>
+<canvas id="c" width="320" height="320" class="nomargin"></canvas>
xlai (Olivia) 2016/09/22 16:12:24 The reason why I use a larger canvas is to trigger
</div>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698