3 This tests verifies that filters work even on composited layers that fallback 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.
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 should be no red and it should not crash.
16 background-color: green;
17 transform: translate(50px, 0px) rotate(20deg);
21 /* force a composited layer */
22 transform: translate3d(0, 0, 0);
25 -webkit-filter: drop-shadow(0px 0px 1px blue) blur(5px);
31 -webkit-filter: blur(5px) drop-shadow(0px 0px 1px blue);
35 <script src="../../resources/run-after-display.js"></script>
37 if (window.testRunner) {
38 testRunner.dumpAsTextWithPixelResults();
39 testRunner.waitUntilDone();
42 function repaintTest()
44 runAfterDisplay(function() {
45 document.querySelector(".before").classList.remove("before");
46 testRunner.notifyDone();
52 <body onload="repaintTest()">
54 <div class="blur before">
55 <div class="box"></div>
56 <div class="box"></div>
57 <div class="box"></div>