mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1467552 - make VectorImage::Show force OP_OVER. r=bas
This commit is contained in:
parent
6760ecaba9
commit
d273b4ddcc
@ -302,7 +302,8 @@ static already_AddRefed<gfxDrawable>
|
||||
CreateSamplingRestrictedDrawable(gfxDrawable* aDrawable,
|
||||
gfxContext* aContext,
|
||||
const ImageRegion& aRegion,
|
||||
const SurfaceFormat aFormat)
|
||||
const SurfaceFormat aFormat,
|
||||
bool aUseOptimalFillOp)
|
||||
{
|
||||
AUTO_PROFILER_LABEL("CreateSamplingRestrictedDrawable", GRAPHICS);
|
||||
|
||||
@ -338,7 +339,9 @@ CreateSamplingRestrictedDrawable(gfxDrawable* aDrawable,
|
||||
RefPtr<gfxContext> tmpCtx = gfxContext::CreateOrNull(target);
|
||||
MOZ_ASSERT(tmpCtx); // already checked the target above
|
||||
|
||||
tmpCtx->SetOp(OptimalFillOp());
|
||||
if (aUseOptimalFillOp) {
|
||||
tmpCtx->SetOp(OptimalFillOp());
|
||||
}
|
||||
aDrawable->Draw(tmpCtx, needed - needed.TopLeft(), ExtendMode::REPEAT,
|
||||
SamplingFilter::LINEAR,
|
||||
1.0, gfxMatrix::Translation(needed.TopLeft()));
|
||||
@ -524,7 +527,8 @@ gfxUtils::DrawPixelSnapped(gfxContext* aContext,
|
||||
const SurfaceFormat aFormat,
|
||||
SamplingFilter aSamplingFilter,
|
||||
uint32_t aImageFlags,
|
||||
gfxFloat aOpacity)
|
||||
gfxFloat aOpacity,
|
||||
bool aUseOptimalFillOp)
|
||||
{
|
||||
AUTO_PROFILER_LABEL("gfxUtils::DrawPixelSnapped", GRAPHICS);
|
||||
|
||||
@ -571,7 +575,8 @@ gfxUtils::DrawPixelSnapped(gfxContext* aContext,
|
||||
#if !defined(MOZ_GFX_OPTIMIZE_MOBILE)
|
||||
RefPtr<gfxDrawable> restrictedDrawable =
|
||||
CreateSamplingRestrictedDrawable(aDrawable, aContext,
|
||||
aRegion, aFormat);
|
||||
aRegion, aFormat,
|
||||
aUseOptimalFillOp);
|
||||
if (restrictedDrawable) {
|
||||
drawable.swap(restrictedDrawable);
|
||||
|
||||
|
@ -93,7 +93,8 @@ public:
|
||||
const mozilla::gfx::SurfaceFormat aFormat,
|
||||
mozilla::gfx::SamplingFilter aSamplingFilter,
|
||||
uint32_t aImageFlags = imgIContainer::FLAG_NONE,
|
||||
gfxFloat aOpacity = 1.0);
|
||||
gfxFloat aOpacity = 1.0,
|
||||
bool aUseOptimalFillOp = true);
|
||||
|
||||
/**
|
||||
* Clip aContext to the region aRegion.
|
||||
|
@ -1213,7 +1213,7 @@ VectorImage::Show(gfxDrawable* aDrawable, const SVGDrawingParameters& aParams)
|
||||
aParams.region,
|
||||
SurfaceFormat::B8G8R8A8,
|
||||
aParams.samplingFilter,
|
||||
aParams.flags, aParams.opacity);
|
||||
aParams.flags, aParams.opacity, false);
|
||||
|
||||
#ifdef DEBUG
|
||||
NotifyDrawingObservers();
|
||||
|
15
layout/svg/crashtests/1467552-1.html
Normal file
15
layout/svg/crashtests/1467552-1.html
Normal file
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="UTF-8">
|
||||
<html>
|
||||
<style>
|
||||
fieldset {
|
||||
mask: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciLz4=),
|
||||
padding-box;
|
||||
margin-right: 75px;
|
||||
}
|
||||
span {
|
||||
vertical-align: 672in;
|
||||
}
|
||||
</style>
|
||||
<fieldset><span><video></video></span></fieldset>
|
||||
</html>
|
@ -208,6 +208,7 @@ load 1421807-1.html
|
||||
pref(dom.webcomponents.shadowdom.enabled,true) load 1421807-2.html
|
||||
load 1422226.html
|
||||
load 1443092.html
|
||||
load 1467552-1.html
|
||||
load conditional-outer-svg-nondirty-reflow-assert.xhtml
|
||||
load extref-test-1.xhtml
|
||||
load blob-merging-and-retained-display-list.html
|
||||
|
Loading…
Reference in New Issue
Block a user