OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 This tests verifies that filters work even on composited layers that fallbac
k to rendering in software. | 3 This tests verifies that filters work even on composited layers that fallbac
k to rendering in software. |
4 NOTE: It is using the fact that Safari can draw drop-shadows in GPU only if
the filter is the last one in the filter chain. | 4 NOTE: It is using the fact that Safari can draw drop-shadows in GPU only if
the filter is the last one in the filter chain. |
5 You should see three green rectangles slightly rotated and blurred. There sh
ould be no red. | 5 You should see three green rectangles slightly rotated and blurred. There sh
ould be no red. |
6 --> | 6 --> |
7 <html> | 7 <html> |
8 <head> | 8 <head> |
9 <style> | 9 <style> |
10 .box { | 10 .box { |
(...skipping 13 matching lines...) Expand all Loading... |
24 /* force a composited layer */ | 24 /* force a composited layer */ |
25 -webkit-transform: translate3d(0, 0, 0); | 25 -webkit-transform: translate3d(0, 0, 0); |
26 background: red; | 26 background: red; |
27 margin: 50px; | 27 margin: 50px; |
28 -webkit-filter: drop-shadow(0px 0px 1px blue) blur(5px); | 28 -webkit-filter: drop-shadow(0px 0px 1px blue) blur(5px); |
29 width: 0px; | 29 width: 0px; |
30 height: 0px; | 30 height: 0px; |
31 } | 31 } |
32 </style> | 32 </style> |
33 | 33 |
34 <script src="../../fast/repaint/resources/repaint.js"></script> | 34 <script src="../../resources/run-after-display.js"></script> |
35 <script> | 35 <script> |
36 if (window.testRunner) | 36 if (window.testRunner) { |
37 testRunner.dumpAsTextWithPixelResults(); | 37 testRunner.dumpAsTextWithPixelResults(); |
| 38 testRunner.waitUntilDone(); |
| 39 } |
38 | 40 |
39 function repaintTest() | 41 function repaintTest() |
40 { | 42 { |
41 document.querySelector(".before").classList.remove("before"); | 43 document.querySelector(".before").classList.remove("before"); |
| 44 if (window.testRunner) |
| 45 testRunner.notifyDone(); |
42 } | 46 } |
43 </script> | 47 </script> |
44 </head> | 48 </head> |
45 | 49 |
46 <body onload="runRepaintTest()"> | 50 <body onload="repaintTest()"> |
47 | 51 |
48 <div class="blur"> | 52 <div class="blur"> |
49 <div class="box"></div> | 53 <div class="box"></div> |
50 <div class="box before"></div> | 54 <div class="box before"></div> |
51 <div class="box"></div> | 55 <div class="box"></div> |
52 </div> | 56 </div> |
53 | 57 |
54 </body> | 58 </body> |
55 </html> | 59 </html> |
OLD | NEW |