Bug 1435045 - Don't make CSS filters on the <svg> element use fallback. r=jrmuizel
authorMarkus Stange <mstange@themasta.com>
Wed, 22 Aug 2018 22:06:24 +0000
changeset 488038 d77ca862636da2f413aa0b3a6e98c11c45ecae15
parent 488037 867a77e99ab0d656c7e8f10f7d1d5950501e7535
child 488039 cd6a42517bb9e60c45b6441a986b53d8da7fb147
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1435045
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1435045 - Don't make CSS filters on the <svg> element use fallback. r=jrmuizel Differential Revision: https://phabricator.services.mozilla.com/D4018
layout/painting/nsDisplayList.cpp
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -9655,23 +9655,18 @@ ClampStdDeviation(float aStdDeviation)
 
 bool
 nsDisplayFilter::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
                                          mozilla::wr::IpcResourceUpdateQueue& aResources,
                                          const StackingContextHelper& aSc,
                                          mozilla::layers::WebRenderLayerManager* aManager,
                                          nsDisplayListBuilder* aDisplayListBuilder)
 {
-  if (mFrame->IsFrameOfType(nsIFrame::eSVG)) {
-    return false;
-  }
-
-  // Due to differences in the way that WebRender filters operate
-  // only the brightness and contrast filters use that path. We
-  // can gradually enable more filters as WebRender bugs are fixed.
+  // All CSS filters are supported by WebRender. SVG filters are not supported,
+  // those use NS_STYLE_FILTER_URL.
   nsTArray<mozilla::wr::WrFilterOp> wrFilters;
   const nsTArray<nsStyleFilter>& filters = mFrame->StyleEffects()->mFilters;
   for (const nsStyleFilter& filter : filters) {
     switch (filter.GetType()) {
       case NS_STYLE_FILTER_BRIGHTNESS:
       case NS_STYLE_FILTER_CONTRAST:
       case NS_STYLE_FILTER_GRAYSCALE:
       case NS_STYLE_FILTER_INVERT: