| 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 First we apply the shaders using a composited layer, but compute the filters
in CPU. Then we switch to compute them in GPU. | 5 First we apply the shaders using a composited layer, but compute the filters
in CPU. Then we switch to compute them in GPU. |
| 6 You should see three green rectangles slightly rotated and blurred. There sh
ould be no red and it should not crash. | 6 You should see three green rectangles slightly rotated and blurred. There sh
ould be no red and it should not crash. |
| 7 --> | 7 --> |
| 8 <html> | 8 <html> |
| 9 <head> | 9 <head> |
| 10 <style> | 10 <style> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 -webkit-filter: drop-shadow(0px 0px 1px blue) blur(5px); | 25 -webkit-filter: drop-shadow(0px 0px 1px blue) blur(5px); |
| 26 width: 0px; | 26 width: 0px; |
| 27 height: 0px; | 27 height: 0px; |
| 28 } | 28 } |
| 29 | 29 |
| 30 .before { | 30 .before { |
| 31 -webkit-filter: blur(5px) drop-shadow(0px 0px 1px blue); | 31 -webkit-filter: blur(5px) drop-shadow(0px 0px 1px blue); |
| 32 } | 32 } |
| 33 </style> | 33 </style> |
| 34 | 34 |
| 35 <script src="../../fast/repaint/resources/repaint.js"></script> | 35 <script src="../../resources/run-after-display.js"></script> |
| 36 <script> | 36 <script> |
| 37 if (window.testRunner) | 37 if (window.testRunner) { |
| 38 testRunner.dumpAsTextWithPixelResults(); | 38 testRunner.dumpAsTextWithPixelResults(); |
| 39 testRunner.waitUntilDone(); |
| 40 } |
| 39 | 41 |
| 40 function repaintTest() | 42 function repaintTest() |
| 41 { | 43 { |
| 42 document.querySelector(".before").classList.remove("before"); | 44 runAfterDisplay(function() { |
| 45 document.querySelector(".before").classList.remove("before"); |
| 46 testRunner.notifyDone(); |
| 47 }); |
| 43 } | 48 } |
| 44 </script> | 49 </script> |
| 45 </head> | 50 </head> |
| 46 | 51 |
| 47 <body onload="runRepaintTest()"> | 52 <body onload="repaintTest()"> |
| 48 | 53 |
| 49 <div class="blur before"> | 54 <div class="blur before"> |
| 50 <div class="box"></div> | 55 <div class="box"></div> |
| 51 <div class="box"></div> | 56 <div class="box"></div> |
| 52 <div class="box"></div> | 57 <div class="box"></div> |
| 53 </div> | 58 </div> |
| 54 | 59 |
| 55 </body> | 60 </body> |
| 56 </html> | 61 </html> |
| OLD | NEW |