зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 928f5840c78d (bug 1392200) for Windows bustage at gfx/layers/d3d11/TextureD3D11.cpp(1132). r=backout
This commit is contained in:
Родитель
6ba627d8ce
Коммит
ccf82e3842
|
@ -663,8 +663,7 @@ DisplayListBuilder::PushStackingContext(const wr::LayoutRect& aBounds,
|
||||||
wr::TransformStyle aTransformStyle,
|
wr::TransformStyle aTransformStyle,
|
||||||
const gfx::Matrix4x4* aPerspective,
|
const gfx::Matrix4x4* aPerspective,
|
||||||
const wr::MixBlendMode& aMixBlendMode,
|
const wr::MixBlendMode& aMixBlendMode,
|
||||||
const nsTArray<wr::WrFilterOp>& aFilters,
|
const nsTArray<wr::WrFilterOp>& aFilters)
|
||||||
bool aIsBackfaceVisible)
|
|
||||||
{
|
{
|
||||||
wr::LayoutTransform matrix;
|
wr::LayoutTransform matrix;
|
||||||
if (aTransform) {
|
if (aTransform) {
|
||||||
|
@ -680,7 +679,7 @@ DisplayListBuilder::PushStackingContext(const wr::LayoutRect& aBounds,
|
||||||
aTransform ? Stringify(*aTransform).c_str() : "none");
|
aTransform ? Stringify(*aTransform).c_str() : "none");
|
||||||
wr_dp_push_stacking_context(mWrState, aBounds, aAnimationId, aOpacity,
|
wr_dp_push_stacking_context(mWrState, aBounds, aAnimationId, aOpacity,
|
||||||
maybeTransform, aTransformStyle, maybePerspective,
|
maybeTransform, aTransformStyle, maybePerspective,
|
||||||
aMixBlendMode, aFilters.Elements(), aFilters.Length(), aIsBackfaceVisible);
|
aMixBlendMode, aFilters.Elements(), aFilters.Length());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -801,20 +800,18 @@ DisplayListBuilder::PopClipAndScrollInfo()
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushRect(const wr::LayoutRect& aBounds,
|
DisplayListBuilder::PushRect(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::ColorF& aColor)
|
const wr::ColorF& aColor)
|
||||||
{
|
{
|
||||||
WRDL_LOG("PushRect b=%s cl=%s c=%s\n", mWrState,
|
WRDL_LOG("PushRect b=%s cl=%s c=%s\n", mWrState,
|
||||||
Stringify(aBounds).c_str(),
|
Stringify(aBounds).c_str(),
|
||||||
Stringify(aClip).c_str(),
|
Stringify(aClip).c_str(),
|
||||||
Stringify(aColor).c_str());
|
Stringify(aColor).c_str());
|
||||||
wr_dp_push_rect(mWrState, aBounds, aClip, aIsBackfaceVisible, aColor);
|
wr_dp_push_rect(mWrState, aBounds, aClip, aColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushLinearGradient(const wr::LayoutRect& aBounds,
|
DisplayListBuilder::PushLinearGradient(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::LayoutPoint& aStartPoint,
|
const wr::LayoutPoint& aStartPoint,
|
||||||
const wr::LayoutPoint& aEndPoint,
|
const wr::LayoutPoint& aEndPoint,
|
||||||
const nsTArray<wr::GradientStop>& aStops,
|
const nsTArray<wr::GradientStop>& aStops,
|
||||||
|
@ -823,7 +820,7 @@ DisplayListBuilder::PushLinearGradient(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutSize aTileSpacing)
|
const wr::LayoutSize aTileSpacing)
|
||||||
{
|
{
|
||||||
wr_dp_push_linear_gradient(mWrState,
|
wr_dp_push_linear_gradient(mWrState,
|
||||||
aBounds, aClip, aIsBackfaceVisible,
|
aBounds, aClip,
|
||||||
aStartPoint, aEndPoint,
|
aStartPoint, aEndPoint,
|
||||||
aStops.Elements(), aStops.Length(),
|
aStops.Elements(), aStops.Length(),
|
||||||
aExtendMode,
|
aExtendMode,
|
||||||
|
@ -833,7 +830,6 @@ DisplayListBuilder::PushLinearGradient(const wr::LayoutRect& aBounds,
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushRadialGradient(const wr::LayoutRect& aBounds,
|
DisplayListBuilder::PushRadialGradient(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::LayoutPoint& aCenter,
|
const wr::LayoutPoint& aCenter,
|
||||||
const wr::LayoutSize& aRadius,
|
const wr::LayoutSize& aRadius,
|
||||||
const nsTArray<wr::GradientStop>& aStops,
|
const nsTArray<wr::GradientStop>& aStops,
|
||||||
|
@ -842,7 +838,7 @@ DisplayListBuilder::PushRadialGradient(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutSize aTileSpacing)
|
const wr::LayoutSize aTileSpacing)
|
||||||
{
|
{
|
||||||
wr_dp_push_radial_gradient(mWrState,
|
wr_dp_push_radial_gradient(mWrState,
|
||||||
aBounds, aClip, aIsBackfaceVisible,
|
aBounds, aClip,
|
||||||
aCenter, aRadius,
|
aCenter, aRadius,
|
||||||
aStops.Elements(), aStops.Length(),
|
aStops.Elements(), aStops.Length(),
|
||||||
aExtendMode,
|
aExtendMode,
|
||||||
|
@ -852,20 +848,18 @@ DisplayListBuilder::PushRadialGradient(const wr::LayoutRect& aBounds,
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushImage(const wr::LayoutRect& aBounds,
|
DisplayListBuilder::PushImage(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
wr::ImageRendering aFilter,
|
wr::ImageRendering aFilter,
|
||||||
wr::ImageKey aImage)
|
wr::ImageKey aImage)
|
||||||
{
|
{
|
||||||
wr::LayoutSize size;
|
wr::LayoutSize size;
|
||||||
size.width = aBounds.size.width;
|
size.width = aBounds.size.width;
|
||||||
size.height = aBounds.size.height;
|
size.height = aBounds.size.height;
|
||||||
PushImage(aBounds, aClip, aIsBackfaceVisible, size, size, aFilter, aImage);
|
PushImage(aBounds, aClip, size, size, aFilter, aImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushImage(const wr::LayoutRect& aBounds,
|
DisplayListBuilder::PushImage(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::LayoutSize& aStretchSize,
|
const wr::LayoutSize& aStretchSize,
|
||||||
const wr::LayoutSize& aTileSpacing,
|
const wr::LayoutSize& aTileSpacing,
|
||||||
wr::ImageRendering aFilter,
|
wr::ImageRendering aFilter,
|
||||||
|
@ -875,13 +869,12 @@ DisplayListBuilder::PushImage(const wr::LayoutRect& aBounds,
|
||||||
Stringify(aBounds).c_str(),
|
Stringify(aBounds).c_str(),
|
||||||
Stringify(aClip).c_str(), Stringify(aStretchSize).c_str(),
|
Stringify(aClip).c_str(), Stringify(aStretchSize).c_str(),
|
||||||
Stringify(aTileSpacing).c_str());
|
Stringify(aTileSpacing).c_str());
|
||||||
wr_dp_push_image(mWrState, aBounds, aClip, aIsBackfaceVisible, aStretchSize, aTileSpacing, aFilter, aImage);
|
wr_dp_push_image(mWrState, aBounds, aClip, aStretchSize, aTileSpacing, aFilter, aImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushYCbCrPlanarImage(const wr::LayoutRect& aBounds,
|
DisplayListBuilder::PushYCbCrPlanarImage(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
wr::ImageKey aImageChannel0,
|
wr::ImageKey aImageChannel0,
|
||||||
wr::ImageKey aImageChannel1,
|
wr::ImageKey aImageChannel1,
|
||||||
wr::ImageKey aImageChannel2,
|
wr::ImageKey aImageChannel2,
|
||||||
|
@ -891,7 +884,6 @@ DisplayListBuilder::PushYCbCrPlanarImage(const wr::LayoutRect& aBounds,
|
||||||
wr_dp_push_yuv_planar_image(mWrState,
|
wr_dp_push_yuv_planar_image(mWrState,
|
||||||
aBounds,
|
aBounds,
|
||||||
aClip,
|
aClip,
|
||||||
aIsBackfaceVisible,
|
|
||||||
aImageChannel0,
|
aImageChannel0,
|
||||||
aImageChannel1,
|
aImageChannel1,
|
||||||
aImageChannel2,
|
aImageChannel2,
|
||||||
|
@ -902,7 +894,6 @@ DisplayListBuilder::PushYCbCrPlanarImage(const wr::LayoutRect& aBounds,
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushNV12Image(const wr::LayoutRect& aBounds,
|
DisplayListBuilder::PushNV12Image(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
wr::ImageKey aImageChannel0,
|
wr::ImageKey aImageChannel0,
|
||||||
wr::ImageKey aImageChannel1,
|
wr::ImageKey aImageChannel1,
|
||||||
wr::WrYuvColorSpace aColorSpace,
|
wr::WrYuvColorSpace aColorSpace,
|
||||||
|
@ -911,7 +902,6 @@ DisplayListBuilder::PushNV12Image(const wr::LayoutRect& aBounds,
|
||||||
wr_dp_push_yuv_NV12_image(mWrState,
|
wr_dp_push_yuv_NV12_image(mWrState,
|
||||||
aBounds,
|
aBounds,
|
||||||
aClip,
|
aClip,
|
||||||
aIsBackfaceVisible,
|
|
||||||
aImageChannel0,
|
aImageChannel0,
|
||||||
aImageChannel1,
|
aImageChannel1,
|
||||||
aColorSpace,
|
aColorSpace,
|
||||||
|
@ -921,7 +911,6 @@ DisplayListBuilder::PushNV12Image(const wr::LayoutRect& aBounds,
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushYCbCrInterleavedImage(const wr::LayoutRect& aBounds,
|
DisplayListBuilder::PushYCbCrInterleavedImage(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
wr::ImageKey aImageChannel0,
|
wr::ImageKey aImageChannel0,
|
||||||
wr::WrYuvColorSpace aColorSpace,
|
wr::WrYuvColorSpace aColorSpace,
|
||||||
wr::ImageRendering aRendering)
|
wr::ImageRendering aRendering)
|
||||||
|
@ -929,7 +918,6 @@ DisplayListBuilder::PushYCbCrInterleavedImage(const wr::LayoutRect& aBounds,
|
||||||
wr_dp_push_yuv_interleaved_image(mWrState,
|
wr_dp_push_yuv_interleaved_image(mWrState,
|
||||||
aBounds,
|
aBounds,
|
||||||
aClip,
|
aClip,
|
||||||
aIsBackfaceVisible,
|
|
||||||
aImageChannel0,
|
aImageChannel0,
|
||||||
aColorSpace,
|
aColorSpace,
|
||||||
aRendering);
|
aRendering);
|
||||||
|
@ -937,16 +925,14 @@ DisplayListBuilder::PushYCbCrInterleavedImage(const wr::LayoutRect& aBounds,
|
||||||
|
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushIFrame(const wr::LayoutRect& aBounds,
|
DisplayListBuilder::PushIFrame(const wr::LayoutRect& aBounds,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
PipelineId aPipeline)
|
PipelineId aPipeline)
|
||||||
{
|
{
|
||||||
wr_dp_push_iframe(mWrState, aBounds, aIsBackfaceVisible, aPipeline);
|
wr_dp_push_iframe(mWrState, aBounds, aPipeline);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushBorder(const wr::LayoutRect& aBounds,
|
DisplayListBuilder::PushBorder(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::BorderWidths& aWidths,
|
const wr::BorderWidths& aWidths,
|
||||||
const Range<const wr::BorderSide>& aSides,
|
const Range<const wr::BorderSide>& aSides,
|
||||||
const wr::BorderRadius& aRadius)
|
const wr::BorderRadius& aRadius)
|
||||||
|
@ -955,14 +941,13 @@ DisplayListBuilder::PushBorder(const wr::LayoutRect& aBounds,
|
||||||
if (aSides.length() != 4) {
|
if (aSides.length() != 4) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wr_dp_push_border(mWrState, aBounds, aClip, aIsBackfaceVisible,
|
wr_dp_push_border(mWrState, aBounds, aClip,
|
||||||
aWidths, aSides[0], aSides[1], aSides[2], aSides[3], aRadius);
|
aWidths, aSides[0], aSides[1], aSides[2], aSides[3], aRadius);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushBorderImage(const wr::LayoutRect& aBounds,
|
DisplayListBuilder::PushBorderImage(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::BorderWidths& aWidths,
|
const wr::BorderWidths& aWidths,
|
||||||
wr::ImageKey aImage,
|
wr::ImageKey aImage,
|
||||||
const wr::NinePatchDescriptor& aPatch,
|
const wr::NinePatchDescriptor& aPatch,
|
||||||
|
@ -970,7 +955,7 @@ DisplayListBuilder::PushBorderImage(const wr::LayoutRect& aBounds,
|
||||||
const wr::RepeatMode& aRepeatHorizontal,
|
const wr::RepeatMode& aRepeatHorizontal,
|
||||||
const wr::RepeatMode& aRepeatVertical)
|
const wr::RepeatMode& aRepeatVertical)
|
||||||
{
|
{
|
||||||
wr_dp_push_border_image(mWrState, aBounds, aClip, aIsBackfaceVisible,
|
wr_dp_push_border_image(mWrState, aBounds, aClip,
|
||||||
aWidths, aImage, aPatch, aOutset,
|
aWidths, aImage, aPatch, aOutset,
|
||||||
aRepeatHorizontal, aRepeatVertical);
|
aRepeatHorizontal, aRepeatVertical);
|
||||||
}
|
}
|
||||||
|
@ -978,7 +963,6 @@ DisplayListBuilder::PushBorderImage(const wr::LayoutRect& aBounds,
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushBorderGradient(const wr::LayoutRect& aBounds,
|
DisplayListBuilder::PushBorderGradient(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::BorderWidths& aWidths,
|
const wr::BorderWidths& aWidths,
|
||||||
const wr::LayoutPoint& aStartPoint,
|
const wr::LayoutPoint& aStartPoint,
|
||||||
const wr::LayoutPoint& aEndPoint,
|
const wr::LayoutPoint& aEndPoint,
|
||||||
|
@ -986,7 +970,7 @@ DisplayListBuilder::PushBorderGradient(const wr::LayoutRect& aBounds,
|
||||||
wr::ExtendMode aExtendMode,
|
wr::ExtendMode aExtendMode,
|
||||||
const wr::SideOffsets2D_f32& aOutset)
|
const wr::SideOffsets2D_f32& aOutset)
|
||||||
{
|
{
|
||||||
wr_dp_push_border_gradient(mWrState, aBounds, aClip, aIsBackfaceVisible,
|
wr_dp_push_border_gradient(mWrState, aBounds, aClip,
|
||||||
aWidths, aStartPoint, aEndPoint,
|
aWidths, aStartPoint, aEndPoint,
|
||||||
aStops.Elements(), aStops.Length(),
|
aStops.Elements(), aStops.Length(),
|
||||||
aExtendMode, aOutset);
|
aExtendMode, aOutset);
|
||||||
|
@ -995,7 +979,6 @@ DisplayListBuilder::PushBorderGradient(const wr::LayoutRect& aBounds,
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushBorderRadialGradient(const wr::LayoutRect& aBounds,
|
DisplayListBuilder::PushBorderRadialGradient(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::BorderWidths& aWidths,
|
const wr::BorderWidths& aWidths,
|
||||||
const wr::LayoutPoint& aCenter,
|
const wr::LayoutPoint& aCenter,
|
||||||
const wr::LayoutSize& aRadius,
|
const wr::LayoutSize& aRadius,
|
||||||
|
@ -1004,7 +987,7 @@ DisplayListBuilder::PushBorderRadialGradient(const wr::LayoutRect& aBounds,
|
||||||
const wr::SideOffsets2D_f32& aOutset)
|
const wr::SideOffsets2D_f32& aOutset)
|
||||||
{
|
{
|
||||||
wr_dp_push_border_radial_gradient(
|
wr_dp_push_border_radial_gradient(
|
||||||
mWrState, aBounds, aClip, aIsBackfaceVisible, aWidths, aCenter,
|
mWrState, aBounds, aClip, aWidths, aCenter,
|
||||||
aRadius, aStops.Elements(), aStops.Length(),
|
aRadius, aStops.Elements(), aStops.Length(),
|
||||||
aExtendMode, aOutset);
|
aExtendMode, aOutset);
|
||||||
}
|
}
|
||||||
|
@ -1012,13 +995,12 @@ DisplayListBuilder::PushBorderRadialGradient(const wr::LayoutRect& aBounds,
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushText(const wr::LayoutRect& aBounds,
|
DisplayListBuilder::PushText(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const gfx::Color& aColor,
|
const gfx::Color& aColor,
|
||||||
wr::FontInstanceKey aFontKey,
|
wr::FontInstanceKey aFontKey,
|
||||||
Range<const wr::GlyphInstance> aGlyphBuffer,
|
Range<const wr::GlyphInstance> aGlyphBuffer,
|
||||||
const wr::GlyphOptions* aGlyphOptions)
|
const wr::GlyphOptions* aGlyphOptions)
|
||||||
{
|
{
|
||||||
wr_dp_push_text(mWrState, aBounds, aClip, aIsBackfaceVisible,
|
wr_dp_push_text(mWrState, aBounds, aClip,
|
||||||
ToColorF(aColor),
|
ToColorF(aColor),
|
||||||
aFontKey,
|
aFontKey,
|
||||||
&aGlyphBuffer[0], aGlyphBuffer.length(),
|
&aGlyphBuffer[0], aGlyphBuffer.length(),
|
||||||
|
@ -1027,10 +1009,9 @@ DisplayListBuilder::PushText(const wr::LayoutRect& aBounds,
|
||||||
|
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushLine(const wr::LayoutRect& aClip,
|
DisplayListBuilder::PushLine(const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::Line& aLine)
|
const wr::Line& aLine)
|
||||||
{
|
{
|
||||||
wr_dp_push_line(mWrState, aClip, aIsBackfaceVisible, aLine.baseline, aLine.start, aLine.end,
|
wr_dp_push_line(mWrState, aClip, aLine.baseline, aLine.start, aLine.end,
|
||||||
aLine.orientation, aLine.width, aLine.color, aLine.style);
|
aLine.orientation, aLine.width, aLine.color, aLine.style);
|
||||||
|
|
||||||
/* TODO(Gankro): remove this
|
/* TODO(Gankro): remove this
|
||||||
|
@ -1054,10 +1035,9 @@ DisplayListBuilder::PushLine(const wr::LayoutRect& aClip,
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushTextShadow(const wr::LayoutRect& aRect,
|
DisplayListBuilder::PushTextShadow(const wr::LayoutRect& aRect,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::TextShadow& aShadow)
|
const wr::TextShadow& aShadow)
|
||||||
{
|
{
|
||||||
wr_dp_push_text_shadow(mWrState, aRect, aClip, aIsBackfaceVisible, aShadow);
|
wr_dp_push_text_shadow(mWrState, aRect, aClip, aShadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1069,7 +1049,6 @@ DisplayListBuilder::PopTextShadow()
|
||||||
void
|
void
|
||||||
DisplayListBuilder::PushBoxShadow(const wr::LayoutRect& aRect,
|
DisplayListBuilder::PushBoxShadow(const wr::LayoutRect& aRect,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::LayoutRect& aBoxBounds,
|
const wr::LayoutRect& aBoxBounds,
|
||||||
const wr::LayoutVector2D& aOffset,
|
const wr::LayoutVector2D& aOffset,
|
||||||
const wr::ColorF& aColor,
|
const wr::ColorF& aColor,
|
||||||
|
@ -1078,7 +1057,7 @@ DisplayListBuilder::PushBoxShadow(const wr::LayoutRect& aRect,
|
||||||
const float& aBorderRadius,
|
const float& aBorderRadius,
|
||||||
const wr::BoxShadowClipMode& aClipMode)
|
const wr::BoxShadowClipMode& aClipMode)
|
||||||
{
|
{
|
||||||
wr_dp_push_box_shadow(mWrState, aRect, aClip, aIsBackfaceVisible,
|
wr_dp_push_box_shadow(mWrState, aRect, aClip,
|
||||||
aBoxBounds, aOffset, aColor,
|
aBoxBounds, aOffset, aColor,
|
||||||
aBlurRadius, aSpreadRadius, aBorderRadius,
|
aBlurRadius, aSpreadRadius, aBorderRadius,
|
||||||
aClipMode);
|
aClipMode);
|
||||||
|
|
|
@ -219,8 +219,7 @@ public:
|
||||||
wr::TransformStyle aTransformStyle,
|
wr::TransformStyle aTransformStyle,
|
||||||
const gfx::Matrix4x4* aPerspective,
|
const gfx::Matrix4x4* aPerspective,
|
||||||
const wr::MixBlendMode& aMixBlendMode,
|
const wr::MixBlendMode& aMixBlendMode,
|
||||||
const nsTArray<wr::WrFilterOp>& aFilters,
|
const nsTArray<wr::WrFilterOp>& aFilters);
|
||||||
bool aIsBackfaceVisible);
|
|
||||||
void PopStackingContext();
|
void PopStackingContext();
|
||||||
|
|
||||||
wr::WrClipId DefineClip(const wr::LayoutRect& aClipRect,
|
wr::WrClipId DefineClip(const wr::LayoutRect& aClipRect,
|
||||||
|
@ -244,12 +243,10 @@ public:
|
||||||
|
|
||||||
void PushRect(const wr::LayoutRect& aBounds,
|
void PushRect(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::ColorF& aColor);
|
const wr::ColorF& aColor);
|
||||||
|
|
||||||
void PushLinearGradient(const wr::LayoutRect& aBounds,
|
void PushLinearGradient(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::LayoutPoint& aStartPoint,
|
const wr::LayoutPoint& aStartPoint,
|
||||||
const wr::LayoutPoint& aEndPoint,
|
const wr::LayoutPoint& aEndPoint,
|
||||||
const nsTArray<wr::GradientStop>& aStops,
|
const nsTArray<wr::GradientStop>& aStops,
|
||||||
|
@ -259,7 +256,6 @@ public:
|
||||||
|
|
||||||
void PushRadialGradient(const wr::LayoutRect& aBounds,
|
void PushRadialGradient(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::LayoutPoint& aCenter,
|
const wr::LayoutPoint& aCenter,
|
||||||
const wr::LayoutSize& aRadius,
|
const wr::LayoutSize& aRadius,
|
||||||
const nsTArray<wr::GradientStop>& aStops,
|
const nsTArray<wr::GradientStop>& aStops,
|
||||||
|
@ -269,13 +265,11 @@ public:
|
||||||
|
|
||||||
void PushImage(const wr::LayoutRect& aBounds,
|
void PushImage(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
wr::ImageRendering aFilter,
|
wr::ImageRendering aFilter,
|
||||||
wr::ImageKey aImage);
|
wr::ImageKey aImage);
|
||||||
|
|
||||||
void PushImage(const wr::LayoutRect& aBounds,
|
void PushImage(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::LayoutSize& aStretchSize,
|
const wr::LayoutSize& aStretchSize,
|
||||||
const wr::LayoutSize& aTileSpacing,
|
const wr::LayoutSize& aTileSpacing,
|
||||||
wr::ImageRendering aFilter,
|
wr::ImageRendering aFilter,
|
||||||
|
@ -283,7 +277,6 @@ public:
|
||||||
|
|
||||||
void PushYCbCrPlanarImage(const wr::LayoutRect& aBounds,
|
void PushYCbCrPlanarImage(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
wr::ImageKey aImageChannel0,
|
wr::ImageKey aImageChannel0,
|
||||||
wr::ImageKey aImageChannel1,
|
wr::ImageKey aImageChannel1,
|
||||||
wr::ImageKey aImageChannel2,
|
wr::ImageKey aImageChannel2,
|
||||||
|
@ -292,7 +285,6 @@ public:
|
||||||
|
|
||||||
void PushNV12Image(const wr::LayoutRect& aBounds,
|
void PushNV12Image(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
wr::ImageKey aImageChannel0,
|
wr::ImageKey aImageChannel0,
|
||||||
wr::ImageKey aImageChannel1,
|
wr::ImageKey aImageChannel1,
|
||||||
wr::WrYuvColorSpace aColorSpace,
|
wr::WrYuvColorSpace aColorSpace,
|
||||||
|
@ -300,27 +292,23 @@ public:
|
||||||
|
|
||||||
void PushYCbCrInterleavedImage(const wr::LayoutRect& aBounds,
|
void PushYCbCrInterleavedImage(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
wr::ImageKey aImageChannel0,
|
wr::ImageKey aImageChannel0,
|
||||||
wr::WrYuvColorSpace aColorSpace,
|
wr::WrYuvColorSpace aColorSpace,
|
||||||
wr::ImageRendering aFilter);
|
wr::ImageRendering aFilter);
|
||||||
|
|
||||||
void PushIFrame(const wr::LayoutRect& aBounds,
|
void PushIFrame(const wr::LayoutRect& aBounds,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
wr::PipelineId aPipeline);
|
wr::PipelineId aPipeline);
|
||||||
|
|
||||||
// XXX WrBorderSides are passed with Range.
|
// XXX WrBorderSides are passed with Range.
|
||||||
// It is just to bypass compiler bug. See Bug 1357734.
|
// It is just to bypass compiler bug. See Bug 1357734.
|
||||||
void PushBorder(const wr::LayoutRect& aBounds,
|
void PushBorder(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::BorderWidths& aWidths,
|
const wr::BorderWidths& aWidths,
|
||||||
const Range<const wr::BorderSide>& aSides,
|
const Range<const wr::BorderSide>& aSides,
|
||||||
const wr::BorderRadius& aRadius);
|
const wr::BorderRadius& aRadius);
|
||||||
|
|
||||||
void PushBorderImage(const wr::LayoutRect& aBounds,
|
void PushBorderImage(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::BorderWidths& aWidths,
|
const wr::BorderWidths& aWidths,
|
||||||
wr::ImageKey aImage,
|
wr::ImageKey aImage,
|
||||||
const wr::NinePatchDescriptor& aPatch,
|
const wr::NinePatchDescriptor& aPatch,
|
||||||
|
@ -330,7 +318,6 @@ public:
|
||||||
|
|
||||||
void PushBorderGradient(const wr::LayoutRect& aBounds,
|
void PushBorderGradient(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::BorderWidths& aWidths,
|
const wr::BorderWidths& aWidths,
|
||||||
const wr::LayoutPoint& aStartPoint,
|
const wr::LayoutPoint& aStartPoint,
|
||||||
const wr::LayoutPoint& aEndPoint,
|
const wr::LayoutPoint& aEndPoint,
|
||||||
|
@ -340,7 +327,6 @@ public:
|
||||||
|
|
||||||
void PushBorderRadialGradient(const wr::LayoutRect& aBounds,
|
void PushBorderRadialGradient(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::BorderWidths& aWidths,
|
const wr::BorderWidths& aWidths,
|
||||||
const wr::LayoutPoint& aCenter,
|
const wr::LayoutPoint& aCenter,
|
||||||
const wr::LayoutSize& aRadius,
|
const wr::LayoutSize& aRadius,
|
||||||
|
@ -350,19 +336,16 @@ public:
|
||||||
|
|
||||||
void PushText(const wr::LayoutRect& aBounds,
|
void PushText(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const gfx::Color& aColor,
|
const gfx::Color& aColor,
|
||||||
wr::FontInstanceKey aFontKey,
|
wr::FontInstanceKey aFontKey,
|
||||||
Range<const wr::GlyphInstance> aGlyphBuffer,
|
Range<const wr::GlyphInstance> aGlyphBuffer,
|
||||||
const wr::GlyphOptions* aGlyphOptions = nullptr);
|
const wr::GlyphOptions* aGlyphOptions = nullptr);
|
||||||
|
|
||||||
void PushLine(const wr::LayoutRect& aClip,
|
void PushLine(const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::Line& aLine);
|
const wr::Line& aLine);
|
||||||
|
|
||||||
void PushTextShadow(const wr::LayoutRect& aBounds,
|
void PushTextShadow(const wr::LayoutRect& aBounds,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::TextShadow& aShadow);
|
const wr::TextShadow& aShadow);
|
||||||
|
|
||||||
void PopTextShadow();
|
void PopTextShadow();
|
||||||
|
@ -371,7 +354,6 @@ public:
|
||||||
|
|
||||||
void PushBoxShadow(const wr::LayoutRect& aRect,
|
void PushBoxShadow(const wr::LayoutRect& aRect,
|
||||||
const wr::LayoutRect& aClip,
|
const wr::LayoutRect& aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
const wr::LayoutRect& aBoxBounds,
|
const wr::LayoutRect& aBoxBounds,
|
||||||
const wr::LayoutVector2D& aOffset,
|
const wr::LayoutVector2D& aOffset,
|
||||||
const wr::ColorF& aColor,
|
const wr::ColorF& aColor,
|
||||||
|
|
|
@ -1114,8 +1114,7 @@ pub extern "C" fn wr_dp_push_stacking_context(state: &mut WrState,
|
||||||
perspective: *const LayoutTransform,
|
perspective: *const LayoutTransform,
|
||||||
mix_blend_mode: MixBlendMode,
|
mix_blend_mode: MixBlendMode,
|
||||||
filters: *const WrFilterOp,
|
filters: *const WrFilterOp,
|
||||||
filter_count: usize,
|
filter_count: usize) {
|
||||||
is_backface_visible: bool) {
|
|
||||||
assert!(unsafe { !is_in_render_thread() });
|
assert!(unsafe { !is_in_render_thread() });
|
||||||
|
|
||||||
let c_filters = make_slice(filters, filter_count);
|
let c_filters = make_slice(filters, filter_count);
|
||||||
|
@ -1157,9 +1156,7 @@ pub extern "C" fn wr_dp_push_stacking_context(state: &mut WrState,
|
||||||
None => None,
|
None => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut prim_info = LayoutPrimitiveInfo::new(bounds);
|
let prim_info = LayoutPrimitiveInfo::new(bounds);
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
|
|
||||||
state.frame_builder
|
state.frame_builder
|
||||||
.dl_builder
|
.dl_builder
|
||||||
.push_stacking_context(&prim_info,
|
.push_stacking_context(&prim_info,
|
||||||
|
@ -1275,12 +1272,10 @@ pub extern "C" fn wr_dp_pop_clip_and_scroll_info(state: &mut WrState) {
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn wr_dp_push_iframe(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_iframe(state: &mut WrState,
|
||||||
rect: LayoutRect,
|
rect: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
pipeline_id: WrPipelineId) {
|
pipeline_id: WrPipelineId) {
|
||||||
assert!(unsafe { is_in_main_thread() });
|
assert!(unsafe { is_in_main_thread() });
|
||||||
|
|
||||||
let mut prim_info = LayoutPrimitiveInfo::new(rect);
|
let prim_info = LayoutPrimitiveInfo::new(rect);
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder.dl_builder.push_iframe(&prim_info, pipeline_id);
|
state.frame_builder.dl_builder.push_iframe(&prim_info, pipeline_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1288,12 +1283,10 @@ pub extern "C" fn wr_dp_push_iframe(state: &mut WrState,
|
||||||
pub extern "C" fn wr_dp_push_rect(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_rect(state: &mut WrState,
|
||||||
rect: LayoutRect,
|
rect: LayoutRect,
|
||||||
clip: LayoutRect,
|
clip: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
color: ColorF) {
|
color: ColorF) {
|
||||||
assert!(unsafe { !is_in_render_thread() });
|
assert!(unsafe { !is_in_render_thread() });
|
||||||
|
|
||||||
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder.dl_builder.push_rect(&prim_info,
|
state.frame_builder.dl_builder.push_rect(&prim_info,
|
||||||
color);
|
color);
|
||||||
}
|
}
|
||||||
|
@ -1302,15 +1295,13 @@ pub extern "C" fn wr_dp_push_rect(state: &mut WrState,
|
||||||
pub extern "C" fn wr_dp_push_image(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_image(state: &mut WrState,
|
||||||
bounds: LayoutRect,
|
bounds: LayoutRect,
|
||||||
clip: LayoutRect,
|
clip: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
stretch_size: LayoutSize,
|
stretch_size: LayoutSize,
|
||||||
tile_spacing: LayoutSize,
|
tile_spacing: LayoutSize,
|
||||||
image_rendering: ImageRendering,
|
image_rendering: ImageRendering,
|
||||||
key: WrImageKey) {
|
key: WrImageKey) {
|
||||||
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
|
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
|
||||||
|
|
||||||
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
|
let prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder
|
state.frame_builder
|
||||||
.dl_builder
|
.dl_builder
|
||||||
.push_image(&prim_info,
|
.push_image(&prim_info,
|
||||||
|
@ -1325,7 +1316,6 @@ pub extern "C" fn wr_dp_push_image(state: &mut WrState,
|
||||||
pub extern "C" fn wr_dp_push_yuv_planar_image(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_yuv_planar_image(state: &mut WrState,
|
||||||
bounds: LayoutRect,
|
bounds: LayoutRect,
|
||||||
clip: LayoutRect,
|
clip: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
image_key_0: WrImageKey,
|
image_key_0: WrImageKey,
|
||||||
image_key_1: WrImageKey,
|
image_key_1: WrImageKey,
|
||||||
image_key_2: WrImageKey,
|
image_key_2: WrImageKey,
|
||||||
|
@ -1333,8 +1323,7 @@ pub extern "C" fn wr_dp_push_yuv_planar_image(state: &mut WrState,
|
||||||
image_rendering: ImageRendering) {
|
image_rendering: ImageRendering) {
|
||||||
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
|
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
|
||||||
|
|
||||||
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
|
let prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder
|
state.frame_builder
|
||||||
.dl_builder
|
.dl_builder
|
||||||
.push_yuv_image(&prim_info,
|
.push_yuv_image(&prim_info,
|
||||||
|
@ -1348,15 +1337,13 @@ pub extern "C" fn wr_dp_push_yuv_planar_image(state: &mut WrState,
|
||||||
pub extern "C" fn wr_dp_push_yuv_NV12_image(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_yuv_NV12_image(state: &mut WrState,
|
||||||
bounds: LayoutRect,
|
bounds: LayoutRect,
|
||||||
clip: LayoutRect,
|
clip: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
image_key_0: WrImageKey,
|
image_key_0: WrImageKey,
|
||||||
image_key_1: WrImageKey,
|
image_key_1: WrImageKey,
|
||||||
color_space: WrYuvColorSpace,
|
color_space: WrYuvColorSpace,
|
||||||
image_rendering: ImageRendering) {
|
image_rendering: ImageRendering) {
|
||||||
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
|
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
|
||||||
|
|
||||||
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
|
let prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder
|
state.frame_builder
|
||||||
.dl_builder
|
.dl_builder
|
||||||
.push_yuv_image(&prim_info,
|
.push_yuv_image(&prim_info,
|
||||||
|
@ -1370,14 +1357,12 @@ pub extern "C" fn wr_dp_push_yuv_NV12_image(state: &mut WrState,
|
||||||
pub extern "C" fn wr_dp_push_yuv_interleaved_image(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_yuv_interleaved_image(state: &mut WrState,
|
||||||
bounds: LayoutRect,
|
bounds: LayoutRect,
|
||||||
clip: LayoutRect,
|
clip: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
image_key_0: WrImageKey,
|
image_key_0: WrImageKey,
|
||||||
color_space: WrYuvColorSpace,
|
color_space: WrYuvColorSpace,
|
||||||
image_rendering: ImageRendering) {
|
image_rendering: ImageRendering) {
|
||||||
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
|
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
|
||||||
|
|
||||||
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
|
let prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder
|
state.frame_builder
|
||||||
.dl_builder
|
.dl_builder
|
||||||
.push_yuv_image(&prim_info,
|
.push_yuv_image(&prim_info,
|
||||||
|
@ -1390,7 +1375,6 @@ pub extern "C" fn wr_dp_push_yuv_interleaved_image(state: &mut WrState,
|
||||||
pub extern "C" fn wr_dp_push_text(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_text(state: &mut WrState,
|
||||||
bounds: LayoutRect,
|
bounds: LayoutRect,
|
||||||
clip: LayoutRect,
|
clip: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
color: ColorF,
|
color: ColorF,
|
||||||
font_key: WrFontInstanceKey,
|
font_key: WrFontInstanceKey,
|
||||||
glyphs: *const GlyphInstance,
|
glyphs: *const GlyphInstance,
|
||||||
|
@ -1400,8 +1384,7 @@ pub extern "C" fn wr_dp_push_text(state: &mut WrState,
|
||||||
|
|
||||||
let glyph_slice = make_slice(glyphs, glyph_count as usize);
|
let glyph_slice = make_slice(glyphs, glyph_count as usize);
|
||||||
|
|
||||||
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
|
let prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder
|
state.frame_builder
|
||||||
.dl_builder
|
.dl_builder
|
||||||
.push_text(&prim_info,
|
.push_text(&prim_info,
|
||||||
|
@ -1415,12 +1398,10 @@ pub extern "C" fn wr_dp_push_text(state: &mut WrState,
|
||||||
pub extern "C" fn wr_dp_push_text_shadow(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_text_shadow(state: &mut WrState,
|
||||||
bounds: LayoutRect,
|
bounds: LayoutRect,
|
||||||
clip: LayoutRect,
|
clip: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
shadow: TextShadow) {
|
shadow: TextShadow) {
|
||||||
assert!(unsafe { is_in_main_thread() });
|
assert!(unsafe { is_in_main_thread() });
|
||||||
|
|
||||||
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
|
let prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder.dl_builder.push_text_shadow(&prim_info, shadow.into());
|
state.frame_builder.dl_builder.push_text_shadow(&prim_info, shadow.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1434,7 +1415,6 @@ pub extern "C" fn wr_dp_pop_text_shadow(state: &mut WrState) {
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn wr_dp_push_line(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_line(state: &mut WrState,
|
||||||
clip: LayoutRect,
|
clip: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
baseline: f32,
|
baseline: f32,
|
||||||
start: f32,
|
start: f32,
|
||||||
end: f32,
|
end: f32,
|
||||||
|
@ -1444,8 +1424,7 @@ pub extern "C" fn wr_dp_push_line(state: &mut WrState,
|
||||||
style: LineStyle) {
|
style: LineStyle) {
|
||||||
assert!(unsafe { is_in_main_thread() });
|
assert!(unsafe { is_in_main_thread() });
|
||||||
|
|
||||||
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(LayoutRect::zero(), clip.into());
|
let prim_info = LayoutPrimitiveInfo::with_clip_rect(LayoutRect::zero(), clip.into());
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder
|
state.frame_builder
|
||||||
.dl_builder
|
.dl_builder
|
||||||
.push_line(&prim_info,
|
.push_line(&prim_info,
|
||||||
|
@ -1463,7 +1442,6 @@ pub extern "C" fn wr_dp_push_line(state: &mut WrState,
|
||||||
pub extern "C" fn wr_dp_push_border(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_border(state: &mut WrState,
|
||||||
rect: LayoutRect,
|
rect: LayoutRect,
|
||||||
clip: LayoutRect,
|
clip: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
widths: BorderWidths,
|
widths: BorderWidths,
|
||||||
top: BorderSide,
|
top: BorderSide,
|
||||||
right: BorderSide,
|
right: BorderSide,
|
||||||
|
@ -1479,8 +1457,7 @@ pub extern "C" fn wr_dp_push_border(state: &mut WrState,
|
||||||
bottom: bottom.into(),
|
bottom: bottom.into(),
|
||||||
radius: radius.into(),
|
radius: radius.into(),
|
||||||
});
|
});
|
||||||
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder
|
state.frame_builder
|
||||||
.dl_builder
|
.dl_builder
|
||||||
.push_border(&prim_info,
|
.push_border(&prim_info,
|
||||||
|
@ -1492,7 +1469,6 @@ pub extern "C" fn wr_dp_push_border(state: &mut WrState,
|
||||||
pub extern "C" fn wr_dp_push_border_image(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_border_image(state: &mut WrState,
|
||||||
rect: LayoutRect,
|
rect: LayoutRect,
|
||||||
clip: LayoutRect,
|
clip: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
widths: BorderWidths,
|
widths: BorderWidths,
|
||||||
image: WrImageKey,
|
image: WrImageKey,
|
||||||
patch: NinePatchDescriptor,
|
patch: NinePatchDescriptor,
|
||||||
|
@ -1509,8 +1485,7 @@ pub extern "C" fn wr_dp_push_border_image(state: &mut WrState,
|
||||||
repeat_horizontal: repeat_horizontal.into(),
|
repeat_horizontal: repeat_horizontal.into(),
|
||||||
repeat_vertical: repeat_vertical.into(),
|
repeat_vertical: repeat_vertical.into(),
|
||||||
});
|
});
|
||||||
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder
|
state.frame_builder
|
||||||
.dl_builder
|
.dl_builder
|
||||||
.push_border(&prim_info,
|
.push_border(&prim_info,
|
||||||
|
@ -1522,7 +1497,6 @@ pub extern "C" fn wr_dp_push_border_image(state: &mut WrState,
|
||||||
pub extern "C" fn wr_dp_push_border_gradient(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_border_gradient(state: &mut WrState,
|
||||||
rect: LayoutRect,
|
rect: LayoutRect,
|
||||||
clip: LayoutRect,
|
clip: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
widths: BorderWidths,
|
widths: BorderWidths,
|
||||||
start_point: LayoutPoint,
|
start_point: LayoutPoint,
|
||||||
end_point: LayoutPoint,
|
end_point: LayoutPoint,
|
||||||
|
@ -1545,8 +1519,7 @@ pub extern "C" fn wr_dp_push_border_gradient(state: &mut WrState,
|
||||||
extend_mode.into()),
|
extend_mode.into()),
|
||||||
outset: outset.into(),
|
outset: outset.into(),
|
||||||
});
|
});
|
||||||
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder
|
state.frame_builder
|
||||||
.dl_builder
|
.dl_builder
|
||||||
.push_border(&prim_info,
|
.push_border(&prim_info,
|
||||||
|
@ -1558,7 +1531,6 @@ pub extern "C" fn wr_dp_push_border_gradient(state: &mut WrState,
|
||||||
pub extern "C" fn wr_dp_push_border_radial_gradient(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_border_radial_gradient(state: &mut WrState,
|
||||||
rect: LayoutRect,
|
rect: LayoutRect,
|
||||||
clip: LayoutRect,
|
clip: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
widths: BorderWidths,
|
widths: BorderWidths,
|
||||||
center: LayoutPoint,
|
center: LayoutPoint,
|
||||||
radius: LayoutSize,
|
radius: LayoutSize,
|
||||||
|
@ -1582,8 +1554,7 @@ pub extern "C" fn wr_dp_push_border_radial_gradient(state: &mut WrState,
|
||||||
extend_mode.into()),
|
extend_mode.into()),
|
||||||
outset: outset.into(),
|
outset: outset.into(),
|
||||||
});
|
});
|
||||||
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder
|
state.frame_builder
|
||||||
.dl_builder
|
.dl_builder
|
||||||
.push_border(&prim_info,
|
.push_border(&prim_info,
|
||||||
|
@ -1595,7 +1566,6 @@ pub extern "C" fn wr_dp_push_border_radial_gradient(state: &mut WrState,
|
||||||
pub extern "C" fn wr_dp_push_linear_gradient(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_linear_gradient(state: &mut WrState,
|
||||||
rect: LayoutRect,
|
rect: LayoutRect,
|
||||||
clip: LayoutRect,
|
clip: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
start_point: LayoutPoint,
|
start_point: LayoutPoint,
|
||||||
end_point: LayoutPoint,
|
end_point: LayoutPoint,
|
||||||
stops: *const GradientStop,
|
stops: *const GradientStop,
|
||||||
|
@ -1614,8 +1584,7 @@ pub extern "C" fn wr_dp_push_linear_gradient(state: &mut WrState,
|
||||||
end_point.into(),
|
end_point.into(),
|
||||||
stops_vector,
|
stops_vector,
|
||||||
extend_mode.into());
|
extend_mode.into());
|
||||||
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder
|
state.frame_builder
|
||||||
.dl_builder
|
.dl_builder
|
||||||
.push_gradient(&prim_info,
|
.push_gradient(&prim_info,
|
||||||
|
@ -1628,7 +1597,6 @@ pub extern "C" fn wr_dp_push_linear_gradient(state: &mut WrState,
|
||||||
pub extern "C" fn wr_dp_push_radial_gradient(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_radial_gradient(state: &mut WrState,
|
||||||
rect: LayoutRect,
|
rect: LayoutRect,
|
||||||
clip: LayoutRect,
|
clip: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
center: LayoutPoint,
|
center: LayoutPoint,
|
||||||
radius: LayoutSize,
|
radius: LayoutSize,
|
||||||
stops: *const GradientStop,
|
stops: *const GradientStop,
|
||||||
|
@ -1647,8 +1615,7 @@ pub extern "C" fn wr_dp_push_radial_gradient(state: &mut WrState,
|
||||||
radius.into(),
|
radius.into(),
|
||||||
stops_vector,
|
stops_vector,
|
||||||
extend_mode.into());
|
extend_mode.into());
|
||||||
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder
|
state.frame_builder
|
||||||
.dl_builder
|
.dl_builder
|
||||||
.push_radial_gradient(&prim_info,
|
.push_radial_gradient(&prim_info,
|
||||||
|
@ -1661,7 +1628,6 @@ pub extern "C" fn wr_dp_push_radial_gradient(state: &mut WrState,
|
||||||
pub extern "C" fn wr_dp_push_box_shadow(state: &mut WrState,
|
pub extern "C" fn wr_dp_push_box_shadow(state: &mut WrState,
|
||||||
rect: LayoutRect,
|
rect: LayoutRect,
|
||||||
clip: LayoutRect,
|
clip: LayoutRect,
|
||||||
is_backface_visible: bool,
|
|
||||||
box_bounds: LayoutRect,
|
box_bounds: LayoutRect,
|
||||||
offset: LayoutVector2D,
|
offset: LayoutVector2D,
|
||||||
color: ColorF,
|
color: ColorF,
|
||||||
|
@ -1671,8 +1637,7 @@ pub extern "C" fn wr_dp_push_box_shadow(state: &mut WrState,
|
||||||
clip_mode: BoxShadowClipMode) {
|
clip_mode: BoxShadowClipMode) {
|
||||||
assert!(unsafe { is_in_main_thread() });
|
assert!(unsafe { is_in_main_thread() });
|
||||||
|
|
||||||
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
|
||||||
prim_info.is_backface_visible = is_backface_visible;
|
|
||||||
state.frame_builder
|
state.frame_builder
|
||||||
.dl_builder
|
.dl_builder
|
||||||
.push_box_shadow(&prim_info,
|
.push_box_shadow(&prim_info,
|
||||||
|
|
|
@ -886,7 +886,6 @@ WR_INLINE
|
||||||
void wr_dp_push_border(WrState *aState,
|
void wr_dp_push_border(WrState *aState,
|
||||||
LayoutRect aRect,
|
LayoutRect aRect,
|
||||||
LayoutRect aClip,
|
LayoutRect aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
BorderWidths aWidths,
|
BorderWidths aWidths,
|
||||||
BorderSide aTop,
|
BorderSide aTop,
|
||||||
BorderSide aRight,
|
BorderSide aRight,
|
||||||
|
@ -899,7 +898,6 @@ WR_INLINE
|
||||||
void wr_dp_push_border_gradient(WrState *aState,
|
void wr_dp_push_border_gradient(WrState *aState,
|
||||||
LayoutRect aRect,
|
LayoutRect aRect,
|
||||||
LayoutRect aClip,
|
LayoutRect aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
BorderWidths aWidths,
|
BorderWidths aWidths,
|
||||||
LayoutPoint aStartPoint,
|
LayoutPoint aStartPoint,
|
||||||
LayoutPoint aEndPoint,
|
LayoutPoint aEndPoint,
|
||||||
|
@ -913,7 +911,6 @@ WR_INLINE
|
||||||
void wr_dp_push_border_image(WrState *aState,
|
void wr_dp_push_border_image(WrState *aState,
|
||||||
LayoutRect aRect,
|
LayoutRect aRect,
|
||||||
LayoutRect aClip,
|
LayoutRect aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
BorderWidths aWidths,
|
BorderWidths aWidths,
|
||||||
WrImageKey aImage,
|
WrImageKey aImage,
|
||||||
NinePatchDescriptor aPatch,
|
NinePatchDescriptor aPatch,
|
||||||
|
@ -926,7 +923,6 @@ WR_INLINE
|
||||||
void wr_dp_push_border_radial_gradient(WrState *aState,
|
void wr_dp_push_border_radial_gradient(WrState *aState,
|
||||||
LayoutRect aRect,
|
LayoutRect aRect,
|
||||||
LayoutRect aClip,
|
LayoutRect aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
BorderWidths aWidths,
|
BorderWidths aWidths,
|
||||||
LayoutPoint aCenter,
|
LayoutPoint aCenter,
|
||||||
LayoutSize aRadius,
|
LayoutSize aRadius,
|
||||||
|
@ -940,7 +936,6 @@ WR_INLINE
|
||||||
void wr_dp_push_box_shadow(WrState *aState,
|
void wr_dp_push_box_shadow(WrState *aState,
|
||||||
LayoutRect aRect,
|
LayoutRect aRect,
|
||||||
LayoutRect aClip,
|
LayoutRect aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
LayoutRect aBoxBounds,
|
LayoutRect aBoxBounds,
|
||||||
LayoutVector2D aOffset,
|
LayoutVector2D aOffset,
|
||||||
ColorF aColor,
|
ColorF aColor,
|
||||||
|
@ -970,7 +965,6 @@ WR_FUNC;
|
||||||
WR_INLINE
|
WR_INLINE
|
||||||
void wr_dp_push_iframe(WrState *aState,
|
void wr_dp_push_iframe(WrState *aState,
|
||||||
LayoutRect aRect,
|
LayoutRect aRect,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
WrPipelineId aPipelineId)
|
WrPipelineId aPipelineId)
|
||||||
WR_FUNC;
|
WR_FUNC;
|
||||||
|
|
||||||
|
@ -978,7 +972,6 @@ WR_INLINE
|
||||||
void wr_dp_push_image(WrState *aState,
|
void wr_dp_push_image(WrState *aState,
|
||||||
LayoutRect aBounds,
|
LayoutRect aBounds,
|
||||||
LayoutRect aClip,
|
LayoutRect aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
LayoutSize aStretchSize,
|
LayoutSize aStretchSize,
|
||||||
LayoutSize aTileSpacing,
|
LayoutSize aTileSpacing,
|
||||||
ImageRendering aImageRendering,
|
ImageRendering aImageRendering,
|
||||||
|
@ -988,7 +981,6 @@ WR_FUNC;
|
||||||
WR_INLINE
|
WR_INLINE
|
||||||
void wr_dp_push_line(WrState *aState,
|
void wr_dp_push_line(WrState *aState,
|
||||||
LayoutRect aClip,
|
LayoutRect aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
float aBaseline,
|
float aBaseline,
|
||||||
float aStart,
|
float aStart,
|
||||||
float aEnd,
|
float aEnd,
|
||||||
|
@ -1002,7 +994,6 @@ WR_INLINE
|
||||||
void wr_dp_push_linear_gradient(WrState *aState,
|
void wr_dp_push_linear_gradient(WrState *aState,
|
||||||
LayoutRect aRect,
|
LayoutRect aRect,
|
||||||
LayoutRect aClip,
|
LayoutRect aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
LayoutPoint aStartPoint,
|
LayoutPoint aStartPoint,
|
||||||
LayoutPoint aEndPoint,
|
LayoutPoint aEndPoint,
|
||||||
const GradientStop *aStops,
|
const GradientStop *aStops,
|
||||||
|
@ -1016,7 +1007,6 @@ WR_INLINE
|
||||||
void wr_dp_push_radial_gradient(WrState *aState,
|
void wr_dp_push_radial_gradient(WrState *aState,
|
||||||
LayoutRect aRect,
|
LayoutRect aRect,
|
||||||
LayoutRect aClip,
|
LayoutRect aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
LayoutPoint aCenter,
|
LayoutPoint aCenter,
|
||||||
LayoutSize aRadius,
|
LayoutSize aRadius,
|
||||||
const GradientStop *aStops,
|
const GradientStop *aStops,
|
||||||
|
@ -1030,7 +1020,6 @@ WR_INLINE
|
||||||
void wr_dp_push_rect(WrState *aState,
|
void wr_dp_push_rect(WrState *aState,
|
||||||
LayoutRect aRect,
|
LayoutRect aRect,
|
||||||
LayoutRect aClip,
|
LayoutRect aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
ColorF aColor)
|
ColorF aColor)
|
||||||
WR_FUNC;
|
WR_FUNC;
|
||||||
|
|
||||||
|
@ -1049,15 +1038,13 @@ void wr_dp_push_stacking_context(WrState *aState,
|
||||||
const LayoutTransform *aPerspective,
|
const LayoutTransform *aPerspective,
|
||||||
MixBlendMode aMixBlendMode,
|
MixBlendMode aMixBlendMode,
|
||||||
const WrFilterOp *aFilters,
|
const WrFilterOp *aFilters,
|
||||||
size_t aFilterCount,
|
size_t aFilterCount)
|
||||||
bool aIsBackfaceVisible)
|
|
||||||
WR_FUNC;
|
WR_FUNC;
|
||||||
|
|
||||||
WR_INLINE
|
WR_INLINE
|
||||||
void wr_dp_push_text(WrState *aState,
|
void wr_dp_push_text(WrState *aState,
|
||||||
LayoutRect aBounds,
|
LayoutRect aBounds,
|
||||||
LayoutRect aClip,
|
LayoutRect aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
ColorF aColor,
|
ColorF aColor,
|
||||||
WrFontInstanceKey aFontKey,
|
WrFontInstanceKey aFontKey,
|
||||||
const GlyphInstance *aGlyphs,
|
const GlyphInstance *aGlyphs,
|
||||||
|
@ -1069,7 +1056,6 @@ WR_INLINE
|
||||||
void wr_dp_push_text_shadow(WrState *aState,
|
void wr_dp_push_text_shadow(WrState *aState,
|
||||||
LayoutRect aBounds,
|
LayoutRect aBounds,
|
||||||
LayoutRect aClip,
|
LayoutRect aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
TextShadow aShadow)
|
TextShadow aShadow)
|
||||||
WR_FUNC;
|
WR_FUNC;
|
||||||
|
|
||||||
|
@ -1078,7 +1064,6 @@ WR_INLINE
|
||||||
void wr_dp_push_yuv_NV12_image(WrState *aState,
|
void wr_dp_push_yuv_NV12_image(WrState *aState,
|
||||||
LayoutRect aBounds,
|
LayoutRect aBounds,
|
||||||
LayoutRect aClip,
|
LayoutRect aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
WrImageKey aImageKey0,
|
WrImageKey aImageKey0,
|
||||||
WrImageKey aImageKey1,
|
WrImageKey aImageKey1,
|
||||||
WrYuvColorSpace aColorSpace,
|
WrYuvColorSpace aColorSpace,
|
||||||
|
@ -1090,7 +1075,6 @@ WR_INLINE
|
||||||
void wr_dp_push_yuv_interleaved_image(WrState *aState,
|
void wr_dp_push_yuv_interleaved_image(WrState *aState,
|
||||||
LayoutRect aBounds,
|
LayoutRect aBounds,
|
||||||
LayoutRect aClip,
|
LayoutRect aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
WrImageKey aImageKey0,
|
WrImageKey aImageKey0,
|
||||||
WrYuvColorSpace aColorSpace,
|
WrYuvColorSpace aColorSpace,
|
||||||
ImageRendering aImageRendering)
|
ImageRendering aImageRendering)
|
||||||
|
@ -1101,7 +1085,6 @@ WR_INLINE
|
||||||
void wr_dp_push_yuv_planar_image(WrState *aState,
|
void wr_dp_push_yuv_planar_image(WrState *aState,
|
||||||
LayoutRect aBounds,
|
LayoutRect aBounds,
|
||||||
LayoutRect aClip,
|
LayoutRect aClip,
|
||||||
bool aIsBackfaceVisible,
|
|
||||||
WrImageKey aImageKey0,
|
WrImageKey aImageKey0,
|
||||||
WrImageKey aImageKey1,
|
WrImageKey aImageKey1,
|
||||||
WrImageKey aImageKey2,
|
WrImageKey aImageKey2,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче