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

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

Issue 2359263002: Fix a gpu pixel test for WebGL's commit() API (Closed)
Patch Set: main thread wait for worker to send back msg 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
« no previous file with comments | « no previous file | content/test/gpu/page_sets/pixel_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_worker.html
diff --git a/content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_worker.html b/content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_worker.html
index d4a9ea713d881c86af13fffbb099c1210e6874b8..2af3576125e3730a6d81b72c04324963504518f1 100644
--- a/content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_worker.html
+++ b/content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_worker.html
@@ -21,6 +21,7 @@ self.onmessage = function(e) {
gl.clearColor(1.0, 0.0, 0.0, 1.0);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.commit();
+ self.postMessage("");
};
</script>
<script>
@@ -34,7 +35,6 @@ function makeWorker(script) {
function main()
{
draw();
- waitForFinish();
}
function draw()
@@ -43,6 +43,9 @@ function draw()
var offscreenCanvas = canvas.transferControlToOffscreen();
var worker = makeWorker(document.getElementById("myWorker").textContent);
worker.postMessage(offscreenCanvas, [offscreenCanvas]);
+ worker.onmessage = function (e) {
+ waitForFinish();
+ }
}
function waitForFinish()
« no previous file with comments | « no previous file | content/test/gpu/page_sets/pixel_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698