From 2fae5d3e6ba64821ce3ffeb74ac372d6496f5593 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Mon, 30 Oct 2023 13:03:32 +0100 Subject: Issue #2364 - use DrawTarget::DrawSurfaceWithShadow to render box shadows on platforms that accelerate it. --- layout/base/nsCSSRendering.cpp | 4 ++-- layout/reftests/box-shadow/reftest.list | 8 ++++---- layout/reftests/bugs/reftest.list | 2 +- layout/reftests/outline/reftest.list | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'layout') diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index d430230894..3084cf9085 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -6023,10 +6023,10 @@ nsContextBoxBlur::Init(const nsRect& aRect, nscoord aSpreadRadius, dirtyRect = transform.TransformBounds(dirtyRect); if (aSkipRect) { gfxRect skipRect = transform.TransformBounds(*aSkipRect); - mContext = mAlphaBoxBlur.Init(rect, spreadRadius, + mContext = mAlphaBoxBlur.Init(aDestinationCtx, rect, spreadRadius, blurRadius, &dirtyRect, &skipRect); } else { - mContext = mAlphaBoxBlur.Init(rect, spreadRadius, + mContext = mAlphaBoxBlur.Init(aDestinationCtx, rect, spreadRadius, blurRadius, &dirtyRect, nullptr); } diff --git a/layout/reftests/box-shadow/reftest.list b/layout/reftests/box-shadow/reftest.list index 8f62299432..0c3bb1d38a 100644 --- a/layout/reftests/box-shadow/reftest.list +++ b/layout/reftests/box-shadow/reftest.list @@ -18,19 +18,19 @@ fuzzy-if(skiaContent,1,50) HTTP(..) == boxshadow-dynamic.xul boxshadow-dynamic-r random-if(d2d) == boxshadow-onecorner.html boxshadow-onecorner-ref.html random-if(d2d) == boxshadow-twocorners.html boxshadow-twocorners-ref.html random-if(d2d) == boxshadow-threecorners.html boxshadow-threecorners-ref.html -== boxshadow-skiprect.html boxshadow-skiprect-ref.html +fuzzy(2,440) == boxshadow-skiprect.html boxshadow-skiprect-ref.html == boxshadow-opacity.html boxshadow-opacity-ref.html == boxshadow-color-rounding.html boxshadow-color-rounding-ref.html == boxshadow-color-rounding-middle.html boxshadow-color-rounding-middle-ref.html -fuzzy-if(OSX==1010,1,24) fuzzy-if(d2d,16,568) == boxshadow-large-border-radius.html boxshadow-large-border-radius-ref.html # Bug 1209649 -fuzzy-if(d2d,2,1080) == boxshadow-border-radius-int.html boxshadow-border-radius-int-ref.html +fuzzy-if(OSX==1010,1,24) fuzzy-if(d2d,16,908) == boxshadow-large-border-radius.html boxshadow-large-border-radius-ref.html # Bug 1209649 +fuzzy(3,500) fuzzy-if(d2d,2,1080) == boxshadow-border-radius-int.html boxshadow-border-radius-int-ref.html == boxshadow-inset-neg-spread.html about:blank == boxshadow-inset-neg-spread2.html boxshadow-inset-neg-spread2-ref.html fuzzy(26,3610) == boxshadow-rotated.html boxshadow-rotated-ref.html # Bug 1211264 == boxshadow-inset-large-border-radius.html boxshadow-inset-large-border-radius-ref.html # fuzzy due to blur going inside, but as long as it's essentially black instead of a light gray its ok. -fuzzy(12,9445) == boxshadow-inset-large-offset.html boxshadow-inset-large-offset-ref.html +fuzzy(12,9445) fuzzy-if(d2d,13,10926) == boxshadow-inset-large-offset.html boxshadow-inset-large-offset-ref.html == overflow-not-scrollable-1.html overflow-not-scrollable-1-ref.html == overflow-not-scrollable-1.html overflow-not-scrollable-1-ref2.html diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index e6cc895d94..3591f38c0c 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -1818,7 +1818,7 @@ HTTP(..) == 983985-2.html 983985-2-ref.html == 985303-1a.html 985303-1-ref.html == 985303-1b.html 985303-1-ref.html == 987680-1.html 987680-1-ref.html -fuzzy-if(d2d,1,36) == 991046-1.html 991046-1-ref.html +fuzzy-if(d2d,1,601) == 991046-1.html 991046-1-ref.html pref(layout.css.overflow-clip-box.enabled,true) fuzzy-if(skiaContent,2,845) == 992447.html 992447-ref.html == 1003425-1.html 1003425-1-ref.html == 1003425-2.html 1003425-2-ref.html diff --git a/layout/reftests/outline/reftest.list b/layout/reftests/outline/reftest.list index a729d892e9..df7e11564a 100644 --- a/layout/reftests/outline/reftest.list +++ b/layout/reftests/outline/reftest.list @@ -1,4 +1,4 @@ -== outline-and-box-shadow.html outline-and-box-shadow-ref.html +fuzzy(2,18) == outline-and-box-shadow.html outline-and-box-shadow-ref.html == outline-and-3d-transform-1a.html outline-and-3d-transform-1-ref.html == outline-and-3d-transform-1b.html outline-and-3d-transform-1-ref.html fuzzy-if(gtkWidget,136,120) fuzzy-if(d2d,16,96) fuzzy-if(cocoaWidget,255,120) fuzzy-if(winWidget,255,216) == outline-and-3d-transform-2.html outline-and-3d-transform-2-ref.html -- cgit v1.2.3