| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 // |
| 5 // READ BEFORE UPDATING: |
| 6 // If this file is updated, make sure to increment the "revision" value of any |
| 7 // tests that use this file in content/test/gpu/page_sets/pixel_tests.py. This |
| 8 // will ensure that the baseline images are regenerated on the next run. |
| 9 |
| 10 var g_swapsBeforeAckUtil = 15; |
| 11 |
| 12 // TODO(kbr): We should test premultiplyAlpha as well. |
| 13 function initGL(canvas, antialias, alpha) |
| 14 { |
| 15 var gl = null; |
| 16 try { |
| 17 gl = canvas.getContext("webgl2", |
| 18 {"alpha": alpha, "antialias":antialias}); |
| 19 } catch (e) {} |
| 20 return gl; |
| 21 } |
| 22 |
| 23 function waitAndSignalHarness() |
| 24 { |
| 25 if (g_swapsBeforeAckUtil == 0) { |
| 26 if (window.domAutomationController) { |
| 27 domAutomationController.setAutomationId(1); |
| 28 domAutomationController.send("SUCCESS"); |
| 29 } |
| 30 } else { |
| 31 g_swapsBeforeAckUtil--; |
| 32 requestAnimationFrame(waitAndSignalHarness); |
| 33 } |
| 34 } |
| OLD | NEW |