Commit feeffa93 authored by xidachen's avatar xidachen Committed by Commit bot

Fix a gpu pixel test for WebGL's commit() API

When this test: pixel_offscreenCanvas_webgl_commit_worker.html was added,
the generated reference image is a blank image which is incorrect. Now
we have fixed the problem, the reference image needs to be updated. So
this CL increment the revision number for the test by 1. This CL also
updates the test by post an empty message back from worker-->main thread.

BUG=563852
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2359263002
Cr-Commit-Position: refs/heads/master@{#420683}
parent 7b30c99f
...@@ -21,6 +21,7 @@ self.onmessage = function(e) { ...@@ -21,6 +21,7 @@ self.onmessage = function(e) {
gl.clearColor(1.0, 0.0, 0.0, 1.0); gl.clearColor(1.0, 0.0, 0.0, 1.0);
gl.clear(gl.COLOR_BUFFER_BIT); gl.clear(gl.COLOR_BUFFER_BIT);
gl.commit(); gl.commit();
self.postMessage("");
}; };
</script> </script>
<script> <script>
...@@ -34,7 +35,6 @@ function makeWorker(script) { ...@@ -34,7 +35,6 @@ function makeWorker(script) {
function main() function main()
{ {
draw(); draw();
waitForFinish();
} }
function draw() function draw()
...@@ -43,6 +43,9 @@ function draw() ...@@ -43,6 +43,9 @@ function draw()
var offscreenCanvas = canvas.transferControlToOffscreen(); var offscreenCanvas = canvas.transferControlToOffscreen();
var worker = makeWorker(document.getElementById("myWorker").textContent); var worker = makeWorker(document.getElementById("myWorker").textContent);
worker.postMessage(offscreenCanvas, [offscreenCanvas]); worker.postMessage(offscreenCanvas, [offscreenCanvas]);
worker.onmessage = function (e) {
waitForFinish();
}
} }
function waitForFinish() function waitForFinish()
......
...@@ -187,7 +187,7 @@ class PixelTestsStorySet(story_set_module.StorySet): ...@@ -187,7 +187,7 @@ class PixelTestsStorySet(story_set_module.StorySet):
url='file://../../data/gpu/pixel_offscreenCanvas_webgl_commit_worker.html', url='file://../../data/gpu/pixel_offscreenCanvas_webgl_commit_worker.html',
name=base_name + '.OffscreenCanvasWebGLRedBoxWorker' + es3_suffix, name=base_name + '.OffscreenCanvasWebGLRedBoxWorker' + es3_suffix,
test_rect=[0, 0, 300, 300], test_rect=[0, 0, 300, 300],
revision=1, revision=2,
story_set=self, story_set=self,
shared_page_state_class=EnableExperimentalCanvasFeaturesSharedPageState, shared_page_state_class=EnableExperimentalCanvasFeaturesSharedPageState,
expectations=expectations)) expectations=expectations))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment