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

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

Issue 2328463004: Implement WebGL's commit on the main thread (Closed)
Patch Set: fix compile error on win_dbg 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_offscreenCanvas_webgl_commit_main.html
diff --git a/content/test/data/gpu/pixel_canvas2d.html b/content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_main.html
similarity index 78%
copy from content/test/data/gpu/pixel_canvas2d.html
copy to content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_main.html
index 7ebbad95aaf8ff2b8700b277395bc351e01a207a..3ae0e56c24d2c1864f35277dbaa6b75ff33191d1 100644
--- a/content/test/data/gpu/pixel_canvas2d.html
+++ b/content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_main.html
@@ -8,7 +8,7 @@ that the baseline images are regenerated on the next run.
<html>
<head>
-<title>Canvas 2D Test: Red Box over Black Background</title>
+<title>OffscreenCanvas commit flow on main thread: green square on white background.</title>
<style type="text/css">
.nomargin {
margin: 0px auto;
@@ -26,10 +26,11 @@ function main()
function draw()
{
var canvas = document.getElementById("c");
- var c2d = canvas.getContext("2d");
- c2d.clearRect(0, 0, canvas.width, canvas.height);
- c2d.fillStyle = "rgba(255, 0, 0, 0.5)";
- c2d.fillRect(50, 50, 100, 100);
+ 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();
}
function waitForFinish()
@@ -46,7 +47,7 @@ function waitForFinish()
</script>
</head>
<body onload="main()">
-<div style="position:relative; width:200px; height:200px; background-color:black">
+<div style="position:relative; width:200px; height:200px; background-color:white">
</div>
<div id="container" style="position:absolute; top:0px; left:0px">
<canvas id="c" width="200" height="200" class="nomargin"></canvas>
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/test/gpu/gpu_tests/pixel_expectations.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698