зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset fd2a2e17aef3 (bug 1415034) for build bustage at layout/painting/nsDisplayList.cpp:9992. r=backout
This commit is contained in:
Родитель
c9fab1d021
Коммит
64b87f0c48
|
@ -730,8 +730,6 @@ static inline wr::WrFilterOpType ToWrFilterOpType(uint32_t type) {
|
|||
return wr::WrFilterOpType::Saturate;
|
||||
case NS_STYLE_FILTER_SEPIA:
|
||||
return wr::WrFilterOpType::Sepia;
|
||||
case NS_STYLE_FILTER_DROP_SHADOW:
|
||||
return wr::WrFilterOpType::DropShadow;
|
||||
}
|
||||
MOZ_ASSERT_UNREACHABLE("Tried to convert unknown filter type.");
|
||||
return wr::WrFilterOpType::Grayscale;
|
||||
|
|
|
@ -359,16 +359,13 @@ pub enum WrFilterOpType {
|
|||
Opacity = 6,
|
||||
Saturate = 7,
|
||||
Sepia = 8,
|
||||
DropShadow = 9,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct WrFilterOp {
|
||||
filter_type: WrFilterOpType,
|
||||
argument: c_float, // holds radius for DropShadow; value for other filters
|
||||
offset: LayoutVector2D, // only used for DropShadow
|
||||
color: ColorF, // only used for DropShadow
|
||||
argument: c_float,
|
||||
}
|
||||
|
||||
/// cbindgen:derive-eq=false
|
||||
|
@ -1296,9 +1293,6 @@ pub extern "C" fn wr_dp_push_stacking_context(state: &mut WrState,
|
|||
WrFilterOpType::Opacity => FilterOp::Opacity(PropertyBinding::Value(c_filter.argument), c_filter.argument),
|
||||
WrFilterOpType::Saturate => FilterOp::Saturate(c_filter.argument),
|
||||
WrFilterOpType::Sepia => FilterOp::Sepia(c_filter.argument),
|
||||
WrFilterOpType::DropShadow => FilterOp::DropShadow(c_filter.offset,
|
||||
c_filter.argument,
|
||||
c_filter.color),
|
||||
}
|
||||
}).collect();
|
||||
|
||||
|
|
|
@ -225,7 +225,6 @@ enum class WrFilterOpType : uint32_t {
|
|||
Opacity = 6,
|
||||
Saturate = 7,
|
||||
Sepia = 8,
|
||||
DropShadow = 9,
|
||||
|
||||
Sentinel /* this must be last for serialization purposes. */
|
||||
};
|
||||
|
@ -692,14 +691,10 @@ struct WrAnimationProperty {
|
|||
struct WrFilterOp {
|
||||
WrFilterOpType filter_type;
|
||||
float argument;
|
||||
LayoutVector2D offset;
|
||||
ColorF color;
|
||||
|
||||
bool operator==(const WrFilterOp& aOther) const {
|
||||
return filter_type == aOther.filter_type &&
|
||||
argument == aOther.argument &&
|
||||
offset == aOther.offset &&
|
||||
color == aOther.color;
|
||||
argument == aOther.argument;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -9972,34 +9972,6 @@ nsDisplayFilter::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuild
|
|||
wrFilters.AppendElement(filterOp);
|
||||
break;
|
||||
}
|
||||
case NS_STYLE_FILTER_DROP_SHADOW: {
|
||||
float appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
nsCSSShadowArray* shadows = filter.GetDropShadow();
|
||||
if (!shadows || shadows->Length() != 1) {
|
||||
NS_NOTREACHED("Exactly one drop shadow should have been parsed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
nsCSSShadowItem* shadow = shadows->ShadowAt(0);
|
||||
nscolor color = shadow->mColor;
|
||||
if (!shadow->mHasColor) {
|
||||
color = mFrame->StyleColor()->mColor;
|
||||
}
|
||||
|
||||
mozilla::wr::WrFilterOp filterOp = {
|
||||
wr::ToWrFilterOpType(filter.GetType()),
|
||||
NSAppUnitsToFloatPixels(shadow->mRadius, appUnitsPerDevPixel),
|
||||
NSAppUnitsToFloatPixels(shadow->mXOffset, appUnitsPerDevPixel),
|
||||
NSAppUnitsToFloatPixels(shadow->mYOffset, appUnitsPerDevPixel),
|
||||
NS_GET_R(color) / 255.0f,
|
||||
NS_GET_G(color) / 255.0f,
|
||||
NS_GET_B(color) / 255.0f,
|
||||
NS_GET_A(color) / 255.0f,
|
||||
};
|
||||
|
||||
wrFilters.AppendElement(filterOp);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
default-preferences pref(layout.css.filters.enabled,true)
|
||||
|
||||
# Some platforms render this complex filter chain a little differently, and that's ok.
|
||||
fuzzy(5,13000) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)&&layersGPUAccelerated,35,13057) fails-if(webrender) == long-chain.html long-chain-ref.html # Win10: Bug 1258241
|
||||
fuzzy(5,13000) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)&&layersGPUAccelerated,35,13057) == long-chain.html long-chain-ref.html # Win10: Bug 1258241
|
||||
== moz-element.html moz-element-ref.html
|
||||
fuzzy-if(webrender,15-15,8262-8262) == same-filter.html same-filter-ref.html
|
||||
|
|
|
@ -26,9 +26,9 @@ fuzzy-if(webrender,6-6,21308-21308) == blur-zoomed-page.html blur-zoomed-page-re
|
|||
== contrast-percent.html contrast-percent-ref.html
|
||||
== contrast-reduce.html contrast-reduce-ref.html
|
||||
== contrast-zero.html contrast-zero-ref.html
|
||||
fuzzy-if(webrender,9-9,2625-2625) == drop-shadow.html drop-shadow-ref.html
|
||||
fuzzy-if(webrender,9-9,2625-2625) == drop-shadow-default-color.html drop-shadow-default-color-ref.html
|
||||
fuzzy-if(webrender,9-9,2625-2625) == drop-shadow-negative-offset.html drop-shadow-negative-offset-ref.html
|
||||
== drop-shadow.html drop-shadow-ref.html
|
||||
== drop-shadow-default-color.html drop-shadow-default-color-ref.html
|
||||
== drop-shadow-negative-offset.html drop-shadow-negative-offset-ref.html
|
||||
== filter-on-huge-bbox.html pass.svg
|
||||
== filter-on-outer-svg.html pass.svg
|
||||
fuzzy-if(webrender,1,10000) fuzzy-if(d2d,1,10000) == grayscale.html grayscale-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче