mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Backed out changeset f8ad5962fc89 (bug 1435094) bustage in /builds/worker/workspace/build/src/layout/painting/nsDisplayList.cpp on a CLOSED TREE
This commit is contained in:
parent
37eed71b1c
commit
0ec806df24
@ -327,9 +327,7 @@ AsyncImagePipelineManager::ApplyAsyncImages()
|
||||
nullptr,
|
||||
pipeline->mMixBlendMode,
|
||||
nsTArray<wr::WrFilterOp>(),
|
||||
true,
|
||||
// This is fine to do unconditionally because we only push images here.
|
||||
wr::GlyphRasterSpace::Screen());
|
||||
true);
|
||||
|
||||
LayoutDeviceRect rect(0, 0, pipeline->mCurrentTexture->GetSize().width, pipeline->mCurrentTexture->GetSize().height);
|
||||
if (pipeline->mScaleToSize.isSome()) {
|
||||
|
@ -17,7 +17,6 @@ StackingContextHelper::StackingContextHelper()
|
||||
, mScale(1.0f, 1.0f)
|
||||
, mAffectsClipPositioning(false)
|
||||
, mIsPreserve3D(false)
|
||||
, mRasterizeLocally(false)
|
||||
{
|
||||
// mOrigin remains at 0,0
|
||||
}
|
||||
@ -34,14 +33,11 @@ StackingContextHelper::StackingContextHelper(const StackingContextHelper& aParen
|
||||
const gfx::CompositionOp& aMixBlendMode,
|
||||
bool aBackfaceVisible,
|
||||
bool aIsPreserve3D,
|
||||
const Maybe<gfx::Matrix4x4>& aTransformForScrollData,
|
||||
const wr::WrClipId* aClipNodeId,
|
||||
bool aRasterizeLocally)
|
||||
const Maybe<gfx::Matrix4x4>& aTransformForScrollData)
|
||||
: mBuilder(&aBuilder)
|
||||
, mScale(1.0f, 1.0f)
|
||||
, mTransformForScrollData(aTransformForScrollData)
|
||||
, mIsPreserve3D(aIsPreserve3D)
|
||||
, mRasterizeLocally(aRasterizeLocally || aParentSC.mRasterizeLocally)
|
||||
{
|
||||
// Compute scale for fallback rendering. We don't try to guess a scale for 3d
|
||||
// transformed items
|
||||
@ -56,12 +52,8 @@ StackingContextHelper::StackingContextHelper(const StackingContextHelper& aParen
|
||||
mScale = aParentSC.mScale;
|
||||
}
|
||||
|
||||
auto rasterSpace = mRasterizeLocally
|
||||
? wr::GlyphRasterSpace::Local(std::max(mScale.width, mScale.height))
|
||||
: wr::GlyphRasterSpace::Screen();
|
||||
|
||||
mBuilder->PushStackingContext(wr::ToLayoutRect(aBounds),
|
||||
aClipNodeId,
|
||||
nullptr,
|
||||
aAnimation,
|
||||
aOpacityPtr,
|
||||
aTransformPtr,
|
||||
@ -69,8 +61,7 @@ StackingContextHelper::StackingContextHelper(const StackingContextHelper& aParen
|
||||
aPerspectivePtr,
|
||||
wr::ToMixBlendMode(aMixBlendMode),
|
||||
aFilters,
|
||||
aBackfaceVisible,
|
||||
rasterSpace);
|
||||
aBackfaceVisible);
|
||||
|
||||
mAffectsClipPositioning =
|
||||
(aTransformPtr && !aTransformPtr->IsIdentity()) ||
|
||||
|
@ -39,9 +39,7 @@ public:
|
||||
const gfx::CompositionOp& aMixBlendMode = gfx::CompositionOp::OP_OVER,
|
||||
bool aBackfaceVisible = true,
|
||||
bool aIsPreserve3D = false,
|
||||
const Maybe<gfx::Matrix4x4>& aTransformForScrollData = Nothing(),
|
||||
const wr::WrClipId* aClipNodeId = nullptr,
|
||||
bool aRasterizeLocally = false);
|
||||
const Maybe<gfx::Matrix4x4>& aTransformForScrollData = Nothing());
|
||||
// This version of the constructor should only be used at the root level
|
||||
// of the tree, so that we have a StackingContextHelper to pass down into
|
||||
// the RenderLayer traversal, but don't actually want it to push a stacking
|
||||
@ -70,7 +68,6 @@ private:
|
||||
bool mAffectsClipPositioning;
|
||||
Maybe<gfx::Matrix4x4> mTransformForScrollData;
|
||||
bool mIsPreserve3D;
|
||||
bool mRasterizeLocally;
|
||||
};
|
||||
|
||||
} // namespace layers
|
||||
|
@ -784,8 +784,7 @@ DisplayListBuilder::PushStackingContext(const wr::LayoutRect& aBounds,
|
||||
const gfx::Matrix4x4* aPerspective,
|
||||
const wr::MixBlendMode& aMixBlendMode,
|
||||
const nsTArray<wr::WrFilterOp>& aFilters,
|
||||
bool aIsBackfaceVisible,
|
||||
const wr::GlyphRasterSpace& aRasterSpace)
|
||||
bool aIsBackfaceVisible)
|
||||
{
|
||||
wr::LayoutTransform matrix;
|
||||
if (aTransform) {
|
||||
@ -796,16 +795,13 @@ DisplayListBuilder::PushStackingContext(const wr::LayoutRect& aBounds,
|
||||
if (aPerspective) {
|
||||
perspective = ToLayoutTransform(*aPerspective);
|
||||
}
|
||||
|
||||
const wr::LayoutTransform* maybePerspective = aPerspective ? &perspective : nullptr;
|
||||
const size_t* maybeClipNodeId = aClipNodeId ? &aClipNodeId->id : nullptr;
|
||||
WRDL_LOG("PushStackingContext b=%s t=%s\n", mWrState, Stringify(aBounds).c_str(),
|
||||
aTransform ? Stringify(*aTransform).c_str() : "none");
|
||||
wr_dp_push_stacking_context(mWrState, aBounds, maybeClipNodeId, aAnimation,
|
||||
aOpacity, maybeTransform, aTransformStyle,
|
||||
maybePerspective, aMixBlendMode,
|
||||
aFilters.Elements(), aFilters.Length(),
|
||||
aIsBackfaceVisible, aRasterSpace);
|
||||
wr_dp_push_stacking_context(mWrState, aBounds, maybeClipNodeId, aAnimation, aOpacity,
|
||||
maybeTransform, aTransformStyle, maybePerspective,
|
||||
aMixBlendMode, aFilters.Elements(), aFilters.Length(), aIsBackfaceVisible);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -269,8 +269,7 @@ public:
|
||||
const gfx::Matrix4x4* aPerspective,
|
||||
const wr::MixBlendMode& aMixBlendMode,
|
||||
const nsTArray<wr::WrFilterOp>& aFilters,
|
||||
bool aIsBackfaceVisible,
|
||||
const wr::GlyphRasterSpace& aRasterSpace);
|
||||
bool aIsBackfaceVisible);
|
||||
void PopStackingContext();
|
||||
|
||||
wr::WrClipId DefineClip(const Maybe<wr::WrScrollId>& aAncestorScrollId,
|
||||
|
@ -30,7 +30,6 @@ derive_eq = true
|
||||
|
||||
[enum]
|
||||
add_sentinel = true
|
||||
derive_helper_methods = true
|
||||
|
||||
[defines]
|
||||
"target_os = windows" = "XP_WIN"
|
||||
|
@ -1577,8 +1577,7 @@ pub extern "C" fn wr_dp_push_stacking_context(state: &mut WrState,
|
||||
mix_blend_mode: MixBlendMode,
|
||||
filters: *const WrFilterOp,
|
||||
filter_count: usize,
|
||||
is_backface_visible: bool,
|
||||
glyph_raster_space: GlyphRasterSpace) {
|
||||
is_backface_visible: bool) {
|
||||
debug_assert!(unsafe { !is_in_render_thread() });
|
||||
|
||||
let c_filters = make_slice(filters, filter_count);
|
||||
@ -1648,7 +1647,7 @@ pub extern "C" fn wr_dp_push_stacking_context(state: &mut WrState,
|
||||
perspective,
|
||||
mix_blend_mode,
|
||||
filters,
|
||||
glyph_raster_space);
|
||||
GlyphRasterSpace::Screen);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
@ -706,49 +706,6 @@ struct WrFilterOp {
|
||||
float matrix[20];
|
||||
};
|
||||
|
||||
struct GlyphRasterSpace {
|
||||
enum class Tag : uint8_t {
|
||||
Local,
|
||||
Screen,
|
||||
|
||||
Sentinel /* this must be last for serialization purposes. */
|
||||
};
|
||||
|
||||
struct Local_Body {
|
||||
float _0;
|
||||
|
||||
bool operator==(const Local_Body& aOther) const {
|
||||
return _0 == aOther._0;
|
||||
}
|
||||
};
|
||||
|
||||
Tag tag;
|
||||
union {
|
||||
Local_Body local;
|
||||
};
|
||||
|
||||
static GlyphRasterSpace Local(float const& a0) {
|
||||
GlyphRasterSpace result;
|
||||
result.local._0 = a0;
|
||||
result.tag = Tag::Local;
|
||||
return result;
|
||||
}
|
||||
|
||||
static GlyphRasterSpace Screen() {
|
||||
GlyphRasterSpace result;
|
||||
result.tag = Tag::Screen;
|
||||
return result;
|
||||
}
|
||||
|
||||
bool IsLocal() const {
|
||||
return tag == Tag::Local;
|
||||
}
|
||||
|
||||
bool IsScreen() const {
|
||||
return tag == Tag::Screen;
|
||||
}
|
||||
};
|
||||
|
||||
struct FontInstanceKey {
|
||||
IdNamespace mNamespace;
|
||||
uint32_t mHandle;
|
||||
@ -1330,8 +1287,7 @@ void wr_dp_push_stacking_context(WrState *aState,
|
||||
MixBlendMode aMixBlendMode,
|
||||
const WrFilterOp *aFilters,
|
||||
uintptr_t aFilterCount,
|
||||
bool aIsBackfaceVisible,
|
||||
GlyphRasterSpace aGlyphRasterSpace)
|
||||
bool aIsBackfaceVisible)
|
||||
WR_FUNC;
|
||||
|
||||
WR_INLINE
|
||||
|
@ -8578,12 +8578,6 @@ nsDisplayTransform::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBu
|
||||
// nsDisplayTransform.
|
||||
transformForScrollData = Some(GetTransform().GetMatrix());
|
||||
}
|
||||
|
||||
// If it looks like we're animated, we should rasterize in local space
|
||||
// (disabling subpixel-aa and global pixel snapping)
|
||||
bool rasterizeLocally = ActiveLayerTracker::IsStyleMaybeAnimated(
|
||||
Frame(), eCSSProperty_transform);
|
||||
|
||||
StackingContextHelper sc(aSc,
|
||||
aBuilder,
|
||||
filters,
|
||||
@ -8596,9 +8590,7 @@ nsDisplayTransform::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBu
|
||||
gfx::CompositionOp::OP_OVER,
|
||||
!BackfaceIsHidden(),
|
||||
mFrame->Extend3DContext() && !mNoExtendContext,
|
||||
transformForScrollData,
|
||||
nullptr,
|
||||
rasterizeLocally);
|
||||
transformForScrollData);
|
||||
|
||||
return mStoredList.CreateWebRenderCommands(aBuilder, aResources, sc,
|
||||
aManager, aDisplayListBuilder);
|
||||
@ -9700,8 +9692,6 @@ nsDisplayMask::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder
|
||||
Maybe<wr::WrImageMask> mask = aManager->CommandBuilder().BuildWrMaskImage(this, aBuilder, aResources,
|
||||
aSc, aDisplayListBuilder,
|
||||
bounds);
|
||||
Maybe<StackingContextHelper> layer = Nothing();
|
||||
const StackingContextHelper* sc = &aSc;
|
||||
if (mask) {
|
||||
auto layoutBounds = wr::ToRoundedLayoutRect(bounds);
|
||||
wr::WrClipId clipId = aBuilder.DefineClip(Nothing(), Nothing(),
|
||||
@ -9711,26 +9701,26 @@ nsDisplayMask::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder
|
||||
// applied to the aggregate, and not the individual elements.
|
||||
|
||||
// The stacking context shouldn't have any offset.
|
||||
bounds.MoveTo(0, 0);
|
||||
layoutBounds.origin.x = 0;
|
||||
layoutBounds.origin.y = 0;
|
||||
|
||||
layer.emplace(aSc,
|
||||
aBuilder,
|
||||
/*aFilters: */ nsTArray<wr::WrFilterOp>(),
|
||||
/*aBounds: */ bounds,
|
||||
/*aBoundTransform: */ nullptr,
|
||||
/*aAnimation: */ nullptr,
|
||||
/*aOpacity: */ nullptr,
|
||||
/*aTransform: */ nullptr,
|
||||
/*aPerspective: */ nullptr,
|
||||
/*aMixBlendMode: */ gfx::CompositionOp::OP_OVER,
|
||||
/*aBackfaceVisible: */ true,
|
||||
/*aIsPreserve3D: */ false,
|
||||
/*aTransformForScrollData: */ Nothing(),
|
||||
/*aClipNodeId: */ &clipId);
|
||||
sc = layer.ptr();
|
||||
aBuilder.PushStackingContext(/*aBounds: */ layoutBounds,
|
||||
/*aClipNodeId: */ &clipId,
|
||||
/*aAnimation: */ nullptr,
|
||||
/*aOpacity: */ nullptr,
|
||||
/*aTransform: */ nullptr,
|
||||
/*aTransformStyle: */ wr::TransformStyle::Flat,
|
||||
/*aPerspective: */ nullptr,
|
||||
/*aMixBlendMode: */ wr::MixBlendMode::Normal,
|
||||
/*aFilters: */ nsTArray<wr::WrFilterOp>(),
|
||||
/*aBackfaceVisible: */ true);
|
||||
}
|
||||
|
||||
nsDisplaySVGEffects::CreateWebRenderCommands(aBuilder, aResources, *sc, aManager, aDisplayListBuilder);
|
||||
nsDisplaySVGEffects::CreateWebRenderCommands(aBuilder, aResources, aSc, aManager, aDisplayListBuilder);
|
||||
|
||||
if (mask) {
|
||||
aBuilder.PopStackingContext();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user