Skip to content

Commit 6f31f80

Browse files
vmpstrchromium-wpt-export-bot
authored andcommitted
VT: Handle empty render pass captures
If the render pass has an empty output rect, we try to create an empty texture for it, which isn't allowed. This patch makes it instead reuse the empty (non-existent) render pass path to treat it as an empty capture, which is what is expected. [email protected] Bug: 404478371 Change-Id: Ic94261f0bbcd29dc8f7a62097beb2e754d589522 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6462513 Reviewed-by: Khushal Sagar <[email protected]> Commit-Queue: Vladimir Levin <[email protected]> Cr-Commit-Position: refs/heads/main@{#1450720}
1 parent ff20308 commit 6f31f80

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<title>View transitions: empty render surface capture (ref)</title>
4+
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
5+
<link rel="author" href="mailto:[email protected]">
6+
<style>
7+
8+
.container {
9+
width: 0px;
10+
height: 0px;
11+
}
12+
.child {
13+
width: 100px;
14+
height: 100px;
15+
background: green;
16+
will-change: opacity;
17+
}
18+
19+
</style>
20+
21+
<div class=container>
22+
<div class=child></div>
23+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<!DOCTYPE html>
2+
<html class=reftest-wait>
3+
<title>View transitions: empty render surface capture</title>
4+
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
5+
<link rel="author" href="mailto:[email protected]">
6+
<link rel="match" href="empty-render-target-capture-ref.html">
7+
<script src="/common/reftest-wait.js"></script>
8+
<script src="/dom/events/scrolling/scroll_support.js"></script>
9+
<style>
10+
11+
:root {
12+
view-transition-name: none;
13+
}
14+
.container {
15+
view-transition-name: container;
16+
width: 0px;
17+
height: 0px;
18+
}
19+
.child {
20+
view-transition-name: child;
21+
width: 100px;
22+
height: 100px;
23+
background: green;
24+
will-change: opacity;
25+
}
26+
27+
::view-transition-group(*),
28+
::view-transition-image-pair(*),
29+
::view-transition-old(*),
30+
::view-transition-new(*) {
31+
animation-play-state: paused;
32+
}
33+
</style>
34+
35+
<div class=container>
36+
<div class=child></div>
37+
</div>
38+
39+
<script>
40+
function runTest() {
41+
document.startViewTransition().ready.then(takeScreenshot);
42+
}
43+
44+
onload = async () => {
45+
await waitForCompositorReady();
46+
runTest();
47+
}
48+
49+
</script>

0 commit comments

Comments
 (0)