Backed out 5 changesets (bug 1456555) for reftest failures on /reftests/svg/paint-order-03.svg.

Backed out changeset ca90391329b7 (bug 1456555)
Backed out changeset 1f269ed43301 (bug 1456555)
Backed out changeset afb19dd18556 (bug 1456555)
Backed out changeset d46e2737134f (bug 1456555)
Backed out changeset 4261b7dc70f7 (bug 1456555)
This commit is contained in:
Brindusan Cristian 2018-11-06 04:52:58 +02:00
parent a7e95660f2
commit 301c937cee
15 changed files with 114 additions and 97 deletions

View File

@ -31,7 +31,6 @@
#include "mozilla/StaticMutex.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/ThreadSafeWeakPtr.h"
#include "mozilla/Atomics.h"
#include "mozilla/DebugOnly.h"
@ -446,14 +445,14 @@ class DataSourceSurface : public SourceSurface
public:
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurface, override)
DataSourceSurface()
: mMapCount(0)
: mIsMapped(false)
{
}
#ifdef DEBUG
virtual ~DataSourceSurface()
{
MOZ_ASSERT(mMapCount == 0);
MOZ_ASSERT(!mIsMapped, "Someone forgot to call Unmap()");
}
#endif
@ -558,31 +557,19 @@ public:
/**
* The caller is responsible for ensuring aMappedSurface is not null.
// Althought Map (and Moz2D in general) isn't normally threadsafe,
// we want to allow it for SourceSurfaceRawData since it should
// always be fine (for reading at least).
//
// This is the same as the base class implementation except using
// mMapCount instead of mIsMapped since that breaks for multithread.
//
// Once mfbt supports Monitors we should implement proper read/write
// locking to prevent write races.
*/
virtual bool Map(MapType, MappedSurface *aMappedSurface)
{
aMappedSurface->mData = GetData();
aMappedSurface->mStride = Stride();
bool success = !!aMappedSurface->mData;
if (success) {
mMapCount++;
}
return success;
mIsMapped = !!aMappedSurface->mData;
return mIsMapped;
}
virtual void Unmap()
{
mMapCount--;
MOZ_ASSERT(mMapCount >= 0);
MOZ_ASSERT(mIsMapped);
mIsMapped = false;
}
/**
@ -627,7 +614,7 @@ public:
virtual void Invalidate(const IntRect& aDirtyRect) { }
protected:
Atomic<int32_t> mMapCount;
bool mIsMapped;
};
/** This is an abstract object that accepts path segments. */

View File

@ -83,9 +83,7 @@ DrawTargetOffset::DrawFilter(FilterNode* aNode, const Rect& aSourceRect, const P
{
auto clone = mTransform;
bool invertible = clone.Invert();
// aSourceRect is in filter space. The filter outputs from aSourceRect need
// to be drawn at aDestPoint in user space.
Rect userSpaceSource = Rect(aDestPoint, aSourceRect.Size());
auto src = aSourceRect;
if (invertible) {
// Try to reduce the source rect so that it's not much bigger
// than the draw target. The result is not minimal. Examples
@ -94,16 +92,11 @@ DrawTargetOffset::DrawFilter(FilterNode* aNode, const Rect& aSourceRect, const P
mOrigin.y,
mDrawTarget->GetSize().width,
mDrawTarget->GetSize().height);
Rect userSpaceBounds = clone.TransformBounds(destRect);
userSpaceSource = userSpaceSource.Intersect(userSpaceBounds);
auto dtBounds = clone.TransformBounds(destRect);
src = aSourceRect.Intersect(dtBounds);
}
// Compute how much we moved the top-left of the source rect by, and use that
// to compute the new dest point, and move our intersected source rect back
// into the (new) filter space.
Point shift = userSpaceSource.TopLeft() - aDestPoint;
Rect filterSpaceSource = Rect(aSourceRect.TopLeft() + shift, userSpaceSource.Size());
mDrawTarget->DrawFilter(aNode, filterSpaceSource, aDestPoint + shift, aOptions);
auto shift = src.TopLeft() - aSourceRect.TopLeft();
mDrawTarget->DrawFilter(aNode, src, aDestPoint + shift, aOptions);
}
void
@ -191,10 +184,9 @@ DrawTargetOffset::PushLayer(bool aOpaque, Float aOpacity, SourceSurface* aMask,
const Matrix& aMaskTransform, const IntRect& aBounds,
bool aCopyBackground)
{
IntRect bounds = aBounds - mOrigin;
IntRect bounds = aBounds;
bounds.MoveBy(mOrigin);
mDrawTarget->PushLayer(aOpaque, aOpacity, aMask, aMaskTransform, bounds, aCopyBackground);
SetPermitSubpixelAA(mDrawTarget->GetPermitSubpixelAA());
}
void
@ -205,17 +197,15 @@ DrawTargetOffset::PushLayerWithBlend(bool aOpaque, Float aOpacity,
bool aCopyBackground,
CompositionOp aOp)
{
IntRect bounds = aBounds - mOrigin;
IntRect bounds = aBounds;
bounds.MoveBy(mOrigin);
mDrawTarget->PushLayerWithBlend(aOpaque, aOpacity, aMask, aMaskTransform, bounds, aCopyBackground, aOp);
SetPermitSubpixelAA(mDrawTarget->GetPermitSubpixelAA());
}
void
DrawTargetOffset::PopLayer()
{
mDrawTarget->PopLayer();
SetPermitSubpixelAA(mDrawTarget->GetPermitSubpixelAA());
}
} // namespace gfx

View File

@ -38,7 +38,7 @@ public:
return mDrawTarget->GetSize();
}
virtual IntRect GetRect() const override {
return IntRect(mOrigin, GetSize());
return mDrawTarget->GetRect();
}
virtual void Flush() override;

View File

@ -2125,10 +2125,6 @@ DrawTargetSkia::PushLayerWithBlend(bool aOpaque, Float aOpacity, SourceSurface*
sk_sp<SkImage> clipImage = aMask ? GetSkImageForSurface(aMask) : nullptr;
SkMatrix clipMatrix;
GfxMatrixToSkiaMatrix(aMaskTransform, clipMatrix);
if (aMask) {
clipMatrix.postTranslate(aMask->GetRect().X(), aMask->GetRect().Y());
}
SkCanvas::SaveLayerRec saveRec(aBounds.IsEmpty() ? nullptr : &bounds,
&paint,
nullptr,

View File

@ -164,14 +164,13 @@ SourceSurfaceD2D1::MarkIndependent()
DataSourceSurfaceD2D1::DataSourceSurfaceD2D1(ID2D1Bitmap1 *aMappableBitmap, SurfaceFormat aFormat)
: mBitmap(aMappableBitmap)
, mFormat(aFormat)
, mIsMapped(false)
, mImplicitMapped(false)
, mMapped(false)
{
}
DataSourceSurfaceD2D1::~DataSourceSurfaceD2D1()
{
if (mImplicitMapped) {
if (mMapped) {
mBitmap->Unmap();
}
}
@ -196,7 +195,7 @@ bool
DataSourceSurfaceD2D1::Map(MapType aMapType, MappedSurface *aMappedSurface)
{
// DataSourceSurfaces used with the new Map API should not be used with GetData!!
MOZ_ASSERT(!mImplicitMapped);
MOZ_ASSERT(!mMapped);
MOZ_ASSERT(!mIsMapped);
D2D1_MAP_OPTIONS options;
@ -241,14 +240,14 @@ DataSourceSurfaceD2D1::EnsureMapped()
{
// Do not use GetData() after having used Map!
MOZ_ASSERT(!mIsMapped);
if (mImplicitMapped) {
if (mMapped) {
return;
}
if (FAILED(mBitmap->Map(D2D1_MAP_OPTIONS_READ, &mMap))) {
gfxCriticalError() << "Failed to map bitmap (EM).";
return;
}
mImplicitMapped = true;
mMapped = true;
}
}

View File

@ -90,8 +90,7 @@ private:
mutable RefPtr<ID2D1Bitmap1> mBitmap;
SurfaceFormat mFormat;
D2D1_MAPPED_RECT mMap;
bool mIsMapped;
bool mImplicitMapped;
bool mMapped;
};
}

View File

@ -23,6 +23,7 @@ public:
: mRawData(0)
, mStride(0)
, mFormat(SurfaceFormat::UNKNOWN)
, mMapCount(0)
, mOwnData(false)
, mDeallocator(nullptr)
, mClosure(nullptr)
@ -37,6 +38,8 @@ public:
// The buffer is created from GuaranteePersistance().
delete [] mRawData;
}
MOZ_ASSERT(mMapCount == 0);
}
virtual uint8_t *GetData() override { return mRawData; }
@ -48,6 +51,32 @@ public:
virtual void GuaranteePersistance() override;
// Althought Map (and Moz2D in general) isn't normally threadsafe,
// we want to allow it for SourceSurfaceRawData since it should
// always be fine (for reading at least).
//
// This is the same as the base class implementation except using
// mMapCount instead of mIsMapped since that breaks for multithread.
//
// Once mfbt supports Monitors we should implement proper read/write
// locking to prevent write races.
virtual bool Map(MapType, MappedSurface *aMappedSurface) override
{
aMappedSurface->mData = GetData();
aMappedSurface->mStride = Stride();
bool success = !!aMappedSurface->mData;
if (success) {
mMapCount++;
}
return success;
}
virtual void Unmap() override
{
mMapCount--;
MOZ_ASSERT(mMapCount >= 0);
}
private:
friend class Factory;
@ -65,6 +94,7 @@ private:
int32_t mStride;
SurfaceFormat mFormat;
IntSize mSize;
Atomic<int32_t> mMapCount;
bool mOwnData;
Factory::SourceSurfaceDeallocator mDeallocator;
@ -78,9 +108,11 @@ public:
SourceSurfaceAlignedRawData()
: mStride(0)
, mFormat(SurfaceFormat::UNKNOWN)
, mMapCount(0)
{}
~SourceSurfaceAlignedRawData()
{
MOZ_ASSERT(mMapCount == 0);
}
bool Init(const IntSize &aSize,
@ -102,6 +134,23 @@ public:
size_t& aExtHandlesOut,
uint64_t& aExtIdOut) const override;
virtual bool Map(MapType, MappedSurface *aMappedSurface) override
{
aMappedSurface->mData = GetData();
aMappedSurface->mStride = Stride();
bool success = !!aMappedSurface->mData;
if (success) {
mMapCount++;
}
return success;
}
virtual void Unmap() override
{
mMapCount--;
MOZ_ASSERT(mMapCount >= 0);
}
private:
friend class Factory;
@ -109,6 +158,7 @@ private:
int32_t mStride;
SurfaceFormat mFormat;
IntSize mSize;
Atomic<int32_t> mMapCount;
};
} // namespace gfx

View File

@ -23,7 +23,6 @@ SourceSurfaceSkia::SourceSurfaceSkia()
, mStride(0)
, mDrawTarget(nullptr)
, mChangeMutex("SourceSurfaceSkia::mChangeMutex")
, mIsMapped(false)
{
}

View File

@ -73,7 +73,6 @@ private:
int32_t mStride;
DrawTargetSkia* mDrawTarget;
Mutex mChangeMutex;
bool mIsMapped;
};
} // namespace gfx

View File

@ -138,6 +138,7 @@ public:
SourceSurfaceSharedData()
: mMutex("SourceSurfaceSharedData")
, mStride(0)
, mMapCount(0)
, mHandleCount(0)
, mFormat(SurfaceFormat::UNKNOWN)
, mClosed(false)
@ -325,6 +326,7 @@ private:
~SourceSurfaceSharedData() override
{
MOZ_ASSERT(mMapCount == 0);
}
void LockHandle()
@ -362,6 +364,7 @@ private:
mutable Mutex mMutex;
int32_t mStride;
int32_t mMapCount;
int32_t mHandleCount;
Maybe<IntRect> mDirtyRect;
IntSize mSize;

View File

@ -31,6 +31,7 @@ public:
SourceSurfaceVolatileData()
: mMutex("SourceSurfaceVolatileData")
, mStride(0)
, mMapCount(0)
, mFormat(SurfaceFormat::UNKNOWN)
, mWasPurged(false)
{
@ -98,10 +99,12 @@ public:
private:
~SourceSurfaceVolatileData() override
{
MOZ_ASSERT(mMapCount == 0);
}
Mutex mMutex;
int32_t mStride;
int32_t mMapCount;
IntSize mSize;
RefPtr<VolatileBuffer> mVBuf;
VolatileBufferPtr<uint8_t> mVBufPtr;

View File

@ -338,9 +338,6 @@ struct DIGroup
ScrollableLayerGuid::ViewID mScrollId;
LayerPoint mResidualOffset;
LayerIntRect mLayerBounds;
// The current bounds of the blob image, relative to
// the top-left of the mLayerBounds.
IntRect mImageBounds;
Maybe<wr::ImageKey> mKey;
std::vector<RefPtr<SourceSurface>> mExternalSurfaces;
std::vector<RefPtr<ScaledFont>> mFonts;
@ -410,7 +407,9 @@ struct DIGroup
LayoutDeviceIntPoint offset = RoundedToInt(bounds.TopLeft());
GP("\n");
GP("CGC offset %d %d\n", offset.x, offset.y);
GP("imageRect %d %d %d %d\n", mImageBounds.x, mImageBounds.y, mImageBounds.width, mImageBounds.height);
LayerIntSize size = mLayerBounds.Size();
IntRect imageRect(0, 0, size.width, size.height);
GP("imageSize: %d %d\n", size.width, size.height);
/*if (aItem->IsReused() && aData->mGeometry) {
return;
}*/
@ -426,13 +425,14 @@ struct DIGroup
nsRect bounds = combined.GetBounds();
IntRect transformedRect = ToDeviceSpace(combined.GetBounds(), aMatrix, appUnitsPerDevPixel, mLayerBounds.TopLeft());
aData->mRect = transformedRect.Intersect(mImageBounds);
aData->mRect = transformedRect.Intersect(imageRect);
GP("CGC %s %d %d %d %d\n", aItem->Name(), bounds.x, bounds.y, bounds.width, bounds.height);
GP("%d %d, %f %f\n", mLayerBounds.TopLeft().x, mLayerBounds.TopLeft().y, aMatrix._11, aMatrix._22);
GP("mRect %d %d %d %d\n", aData->mRect.x, aData->mRect.y, aData->mRect.width, aData->mRect.height);
InvalidateRect(aData->mRect);
aData->mInvalid = true;
} else if (aData->mInvalid || /* XXX: handle image load invalidation */ (aItem->IsInvalid(invalid) && invalid.IsEmpty())) {
MOZ_RELEASE_ASSERT(imageRect.IsEqualEdges(aData->mImageRect));
MOZ_RELEASE_ASSERT(mLayerBounds.TopLeft() == aData->mGroupOffset);
UniquePtr<nsDisplayItemGeometry> geometry(aItem->AllocateGeometry(aBuilder));
/* Instead of doing this dance, let's just invalidate the old rect and the
@ -452,11 +452,11 @@ struct DIGroup
aData->mRect.y,
aData->mRect.width,
aData->mRect.height);
InvalidateRect(aData->mRect.Intersect(mImageBounds));
InvalidateRect(aData->mRect.Intersect(imageRect));
// We want to snap to outside pixels. When should we multiply by the matrix?
// XXX: TransformBounds is expensive. We should avoid doing it if we have no transform
IntRect transformedRect = ToDeviceSpace(combined.GetBounds(), aMatrix, appUnitsPerDevPixel, mLayerBounds.TopLeft());
aData->mRect = transformedRect.Intersect(mImageBounds);
aData->mRect = transformedRect.Intersect(imageRect);
InvalidateRect(aData->mRect);
GP("new rect: %d %d %d %d\n",
aData->mRect.x,
@ -465,6 +465,7 @@ struct DIGroup
aData->mRect.height);
aData->mInvalid = true;
} else {
MOZ_RELEASE_ASSERT(imageRect.IsEqualEdges(aData->mImageRect));
MOZ_RELEASE_ASSERT(mLayerBounds.TopLeft() == aData->mGroupOffset);
GP("else invalidate: %s\n", aItem->Name());
// this includes situations like reflow changing the position
@ -472,7 +473,7 @@ struct DIGroup
if (!combined.IsEmpty()) {
// There might be no point in doing this elaborate tracking here to get
// smaller areas
InvalidateRect(aData->mRect.Intersect(mImageBounds)); // invalidate the old area -- in theory combined should take care of this
InvalidateRect(aData->mRect.Intersect(imageRect)); // invalidate the old area -- in theory combined should take care of this
UniquePtr<nsDisplayItemGeometry> geometry(aItem->AllocateGeometry(aBuilder));
// invalidate the invalidated area.
@ -480,7 +481,7 @@ struct DIGroup
combined = clip.ApplyNonRoundedIntersection(aData->mGeometry->ComputeInvalidationRegion());
IntRect transformedRect = ToDeviceSpace(combined.GetBounds(), aMatrix, appUnitsPerDevPixel, mLayerBounds.TopLeft());
aData->mRect = transformedRect.Intersect(mImageBounds);
aData->mRect = transformedRect.Intersect(imageRect);
InvalidateRect(aData->mRect);
// CGC invariant broken
@ -508,8 +509,8 @@ struct DIGroup
}
combined = clip.ApplyNonRoundedIntersection(aData->mGeometry->ComputeInvalidationRegion());
IntRect transformedRect = ToDeviceSpace(combined.GetBounds(), aMatrix, appUnitsPerDevPixel, mLayerBounds.TopLeft());
InvalidateRect(aData->mRect.Intersect(mImageBounds));
aData->mRect = transformedRect.Intersect(mImageBounds);
InvalidateRect(aData->mRect.Intersect(imageRect));
aData->mRect = transformedRect.Intersect(imageRect);
InvalidateRect(aData->mRect);
GP("ClipChange: %s %d %d %d %d\n", aItem->Name(),
@ -532,8 +533,8 @@ struct DIGroup
}
combined = clip.ApplyNonRoundedIntersection(aData->mGeometry->ComputeInvalidationRegion());
IntRect transformedRect = ToDeviceSpace(combined.GetBounds(), aMatrix, appUnitsPerDevPixel, mLayerBounds.TopLeft());
InvalidateRect(aData->mRect.Intersect(mImageBounds));
aData->mRect = transformedRect.Intersect(mImageBounds);
InvalidateRect(aData->mRect.Intersect(imageRect));
aData->mRect = transformedRect.Intersect(imageRect);
InvalidateRect(aData->mRect);
GP("TransformChange: %s %d %d %d %d\n", aItem->Name(),
@ -545,29 +546,35 @@ struct DIGroup
combined = clip.ApplyNonRoundedIntersection(geometry->ComputeInvalidationRegion());
aData->mGeometry = std::move(geometry);
IntRect transformedRect = ToDeviceSpace(combined.GetBounds(), aMatrix, appUnitsPerDevPixel, mLayerBounds.TopLeft());
InvalidateRect(aData->mRect.Intersect(mImageBounds));
aData->mRect = transformedRect.Intersect(mImageBounds);
InvalidateRect(aData->mRect.Intersect(imageRect));
aData->mRect = transformedRect.Intersect(imageRect);
InvalidateRect(aData->mRect);
GP("UpdateContainerLayerPropertiesAndDetectChange change\n");
} else {
// XXX: this code can eventually be deleted/made debug only
combined = clip.ApplyNonRoundedIntersection(geometry->ComputeInvalidationRegion());
IntRect transformedRect = ToDeviceSpace(combined.GetBounds(), aMatrix, appUnitsPerDevPixel, mLayerBounds.TopLeft());
auto rect = transformedRect.Intersect(imageRect);
GP("Layer NoChange: %s %d %d %d %d\n", aItem->Name(),
aData->mRect.x, aData->mRect.y, aData->mRect.XMost(), aData->mRect.YMost());
MOZ_RELEASE_ASSERT(rect.IsEqualEdges(aData->mRect));
}
} else {
// XXX: this code can eventually be deleted/made debug only
UniquePtr<nsDisplayItemGeometry> geometry(aItem->AllocateGeometry(aBuilder));
combined = clip.ApplyNonRoundedIntersection(geometry->ComputeInvalidationRegion());
IntRect transformedRect = ToDeviceSpace(combined.GetBounds(), aMatrix, appUnitsPerDevPixel, mLayerBounds.TopLeft());
auto rect = transformedRect.Intersect(imageRect);
GP("NoChange: %s %d %d %d %d\n", aItem->Name(),
aData->mRect.x, aData->mRect.y, aData->mRect.XMost(), aData->mRect.YMost());
MOZ_RELEASE_ASSERT(rect.IsEqualEdges(aData->mRect));
}
}
}
aData->mClip = clip;
aData->mMatrix = aMatrix;
aData->mGroupOffset = mLayerBounds.TopLeft();
aData->mImageRect = mImageBounds;
aData->mImageRect = imageRect;
GP("post mInvalidRect: %d %d %d %d\n", mInvalidRect.x, mInvalidRect.y, mInvalidRect.width, mInvalidRect.height);
}
@ -1058,7 +1065,6 @@ Grouper::ConstructGroups(nsDisplayListBuilder* aDisplayListBuilder,
groupData->mFollowingGroup.mGroupBounds = currentGroup->mGroupBounds;
groupData->mFollowingGroup.mAppUnitsPerDevPixel = currentGroup->mAppUnitsPerDevPixel;
groupData->mFollowingGroup.mLayerBounds = currentGroup->mLayerBounds;
groupData->mFollowingGroup.mImageBounds = currentGroup->mImageBounds;
groupData->mFollowingGroup.mScale = currentGroup->mScale;
groupData->mFollowingGroup.mResidualOffset = currentGroup->mResidualOffset;
groupData->mFollowingGroup.mPaintRect = currentGroup->mPaintRect;
@ -1113,22 +1119,11 @@ Grouper::ConstructItemInsideInactive(WebRenderCommandBuilder* aCommandBuilder,
* time that we painted */
data->mInvalid = false;
// we compute the geometry change here because we have the transform around still
aGroup->ComputeGeometryChange(aItem, data, mTransform, mDisplayListBuilder);
// Temporarily restrict the image bounds to the bounds of the container so that
// clipped children within the container know about the clip.
IntRect oldImageBounds = aGroup->mImageBounds;
aGroup->mImageBounds = aGroup->mImageBounds.Intersect(data->mRect);
if (aItem->GetType() == DisplayItemType::TYPE_FILTER) {
gfx::Size scale(1, 1);
// If ComputeDifferences finds any change, we invalidate the entire container item.
// This is needed because blob merging requires the entire item to be within the invalid region.
if (BuildLayer(aItem, data, mDisplayListBuilder, scale)) {
data->mInvalid = true;
aGroup->InvalidateRect(data->mRect);
}
data->mInvalid = BuildLayer(aItem, data, mDisplayListBuilder, scale);
} else if (aItem->GetType() == DisplayItemType::TYPE_TRANSFORM) {
nsDisplayTransform* transformItem = static_cast<nsDisplayTransform*>(aItem);
const Matrix4x4Flagged& t = transformItem->GetTransform();
@ -1139,10 +1134,7 @@ Grouper::ConstructItemInsideInactive(WebRenderCommandBuilder* aCommandBuilder,
gfx::Size scale(1, 1);
// If ComputeDifferences finds any change, we invalidate the entire container item.
// This is needed because blob merging requires the entire item to be within the invalid region.
if (BuildLayer(aItem, data, mDisplayListBuilder, scale)) {
data->mInvalid = true;
aGroup->InvalidateRect(data->mRect);
}
data->mInvalid = BuildLayer(aItem, data, mDisplayListBuilder, scale);
} else {
Matrix m = mTransform;
@ -1160,7 +1152,8 @@ Grouper::ConstructItemInsideInactive(WebRenderCommandBuilder* aCommandBuilder,
}
GP("Including %s of %d\n", aItem->Name(), aGroup->mDisplayItems.Count());
aGroup->mImageBounds = oldImageBounds;
aGroup->ComputeGeometryChange(aItem, data, mTransform, mDisplayListBuilder); // we compute the geometry change here because we have the transform around still
}
/* This is just a copy of nsRect::ScaleToOutsidePixels with an offset added in.
@ -1255,7 +1248,6 @@ WebRenderCommandBuilder::DoGroupingForDisplayList(nsDisplayList* aList,
scale.height,
group.mAppUnitsPerDevPixel,
residualOffset));
group.mImageBounds = IntRect(0, 0, group.mLayerBounds.width, group.mLayerBounds.height);
group.mPaintRect = LayerIntRect::FromUnknownRect(
ScaleToOutsidePixelsOffset(aWrappingItem->GetPaintRect(),
scale.width,

View File

@ -1398,7 +1398,7 @@ pub extern "C" fn wr_resource_updates_add_blob_image(
image_key,
descriptor.into(),
ImageData::new_blob_image(bytes.flush_into_vec()),
if descriptor.format == ImageFormat::BGRA8 { Some(256) } else { None }
None
);
}

View File

@ -324,7 +324,7 @@ fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)||skiaContent,0-1,0-10000) ==
fuzzy-if(Android,0-8,0-200) == outer-svg-border-and-padding-01.svg outer-svg-border-and-padding-01-ref.svg
fuzzy-if(skiaContent,0-7,0-175) fuzzy-if(webrender,54-54,124-124) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == outline.html outline-ref.html # Bug 1392106
fuzzy-if(skiaContent,0-7,0-175) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == outline.html outline-ref.html # Bug 1392106
== overflow-on-outer-svg-01.svg overflow-on-outer-svg-01-ref.svg
== overflow-on-outer-svg-02a.xhtml overflow-on-outer-svg-02-ref.xhtml
@ -339,7 +339,7 @@ fuzzy-if(skiaContent,0-7,0-175) fuzzy-if(webrender,54-54,124-124) random-if(/^Wi
== paint-on-maskLayer-1c.html paint-on-maskLayer-1-ref.html
fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-15,0-5) == paint-order-01.svg paint-order-01-ref.svg
== paint-order-02.svg paint-order-02-ref.svg
fuzzy-if(webrender,72-72,96-96) == paint-order-03.svg paint-order-03-ref.svg
== paint-order-03.svg paint-order-03-ref.svg
#fuzzy(0-23,0-60) fails-if(d2d) == path-01.svg path-01-ref.svg
== path-02.svg pass.svg

View File

@ -2,9 +2,9 @@
# fuzzy is needed here for platform dependent backends
default-preferences pref(layout.css.prefixes.webkit,true)
fuzzy-if(gtkWidget,0-255,0-20) fuzzy-if(winWidget,0-20,0-10) fails-if(skiaContent&&(gtkWidget||winWidget)) fuzzy-if(cocoaWidget&&webrender,48-48,44-44) == webkit-text-stroke-property-001.html webkit-text-stroke-property-001-ref.html
fuzzy-if(gtkWidget,0-255,0-20) fuzzy-if(winWidget,0-20,0-10) fails-if(skiaContent&&!webrender&&gtkWidget) fuzzy-if(webrender,3-4,4-24) == webkit-text-stroke-property-002.html webkit-text-stroke-property-002-ref.html
fuzzy-if(gtkWidget,0-255,0-20) fuzzy-if(winWidget,0-20,0-10) fuzzy-if(webrender,32-48,26-26) fails-if(skiaContent&&gtkWidget) == webkit-text-stroke-property-003.html webkit-text-stroke-property-003-ref.html
fuzzy-if(gtkWidget,0-255,0-20) fuzzy-if(winWidget,0-20,0-10) fuzzy-if(webrender,48-64,21-33) fails-if(skiaContent&&gtkWidget) == webkit-text-stroke-property-004.html webkit-text-stroke-property-004-ref.html
fuzzy-if(gtkWidget,0-255,0-20) fuzzy-if(winWidget,0-20,0-10) fails-if(skiaContent&&(gtkWidget||winWidget)) fuzzy-if(cocoaWidget&&webrender,48-48,44-44) == webkit-text-stroke-property-005.html webkit-text-stroke-property-005-ref.html
fuzzy-if(gtkWidget,0-255,0-20) fuzzy-if(winWidget,0-20,0-10) fails-if(skiaContent&&(gtkWidget||winWidget)) == webkit-text-stroke-property-001.html webkit-text-stroke-property-001-ref.html
fuzzy-if(gtkWidget,0-255,0-20) fuzzy-if(winWidget,0-20,0-10) fails-if(skiaContent&&!webrender&&gtkWidget) == webkit-text-stroke-property-002.html webkit-text-stroke-property-002-ref.html
fuzzy-if(gtkWidget,0-255,0-20) fuzzy-if(winWidget,0-20,0-10) fails-if(skiaContent&&gtkWidget) == webkit-text-stroke-property-003.html webkit-text-stroke-property-003-ref.html
fuzzy-if(gtkWidget,0-255,0-20) fuzzy-if(winWidget,0-20,0-10) fails-if(skiaContent&&gtkWidget) == webkit-text-stroke-property-004.html webkit-text-stroke-property-004-ref.html
fuzzy-if(gtkWidget,0-255,0-20) fuzzy-if(winWidget,0-20,0-10) fails-if(skiaContent&&(gtkWidget||winWidget)) == webkit-text-stroke-property-005.html webkit-text-stroke-property-005-ref.html
fuzzy-if(gtkWidget,0-255,0-392) fuzzy-if(winWidget&&!d2d,0-48,0-372) fuzzy-if(winWidget&&d2d,0-71,0-10) == webkit-text-stroke-property-006.html webkit-text-stroke-property-006-ref.html