Automatic update from web-platform-tests Re-enable virtual/off-main-thread-css-paint/ tests I suspect that due to paint holding two requestAnimationFrames was not consistently enough time to ensure a drawn frame. However, in other tests we use the starting of a composited animation to know when we have for sure drawn a new main frame. By applying the same technique for paint worklet we can re-enable these tests without the same flakiness. Bug: 355693577 Change-Id: I104f229257dc8fa051f8bf6c3c1e569ff2cbe48a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7726989 Reviewed-by: Vladimir Levin <vmpstr@chromium.org> Commit-Queue: Robert Flack <flackr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1610775} -- wpt-commits: e2d58307df0b8139854ad974ef2e4908d2a62baa wpt-pr: 59020
35 lines
1.1 KiB
HTML
35 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html class="reftest-wait">
|
|
<link rel="help" href="https://drafts.css-houdini.org/css-paint-api/">
|
|
<link rel="match" href="paint2d-imageSmoothingQuality.high-ref.html">
|
|
<meta name="fuzzy" content="maxDifference=0-5;totalPixels=0-10">
|
|
<style>
|
|
#output {
|
|
width: 300px;
|
|
height: 300px;
|
|
background-image: paint(image);
|
|
border-image: url(./resources/html5.png);
|
|
}
|
|
</style>
|
|
<script src="/common/reftest-wait.js"></script>
|
|
<script src="/common/worklet-reftest.js"></script>
|
|
<div id="output"></div>
|
|
|
|
<script id="code" type="text/worklet">
|
|
registerPaint('image', class {
|
|
static get inputProperties() { return [ 'border-image-source' ]; };
|
|
paint(ctx, geom, styleMap) {
|
|
ctx.imageSmoothingQuality = 'high';
|
|
ctx.fillStyle = 'green';
|
|
ctx.fillRect(0, 0, geom.width, geom.height);
|
|
ctx.drawImage(styleMap.get('border-image-source'), 0, 0, 200, 200);
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<script>
|
|
importWorkletAndTerminateTestAfterAsyncPaint(
|
|
CSS.paintWorklet, document.getElementById('code').textContent);
|
|
</script>
|
|
</html>
|