compositor-controls.js 591 B

12345678910111213141516171819
  1. // To make sure animation events get processed, periodic lifecycle phase runs
  2. // will include rasterization. See
  3. // https://chromium.googlesource.com/chromium/src/+/main/docs/testing/writing_web_tests.md
  4. // for more information.
  5. function setAnimationRequiresRaster() {
  6. if (window.testRunner) {
  7. testRunner.setAnimationRequiresRaster(true);
  8. }
  9. }
  10. function updateAllLifecyclePhasesAndCompositeAsyncThen(callback) {
  11. setTimeout(function() {
  12. if (!window.testRunner) {
  13. callback();
  14. } else {
  15. testRunner.updateAllLifecyclePhasesAndCompositeThen(callback);
  16. }
  17. },0);
  18. }