mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset d4251829067b (bug 948265) for bustage.
CLOSED TREE
This commit is contained in:
parent
b846853a6b
commit
596a16932d
@ -203,6 +203,101 @@ nsSVGFilterFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
aAttribute, aModType);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsSVGFilterFrame::PaintFilteredFrame(nsRenderingContext *aContext,
|
||||
nsIFrame *aFilteredFrame,
|
||||
nsSVGFilterPaintCallback *aPaintCallback,
|
||||
const nsRect *aDirtyArea,
|
||||
nsIFrame* aTransformRoot)
|
||||
{
|
||||
nsSVGFilterInstance instance(aFilteredFrame, this, aPaintCallback,
|
||||
aDirtyArea, nullptr, nullptr, nullptr,
|
||||
aTransformRoot);
|
||||
if (!instance.IsInitialized()) {
|
||||
return NS_OK;
|
||||
}
|
||||
return instance.Render(aContext->ThebesContext());
|
||||
}
|
||||
|
||||
static nsRect
|
||||
TransformFilterSpaceToFrameSpace(nsSVGFilterInstance *aInstance,
|
||||
nsIntRect *aRect)
|
||||
{
|
||||
if (aRect->IsEmpty()) {
|
||||
return nsRect();
|
||||
}
|
||||
gfxMatrix m = aInstance->GetFilterSpaceToFrameSpaceInCSSPxTransform();
|
||||
gfxRect r(aRect->x, aRect->y, aRect->width, aRect->height);
|
||||
r = m.TransformBounds(r);
|
||||
return nsLayoutUtils::RoundGfxRectToAppRect(r, aInstance->AppUnitsPerCSSPixel());
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsSVGFilterFrame::GetPostFilterDirtyArea(nsIFrame *aFilteredFrame,
|
||||
const nsRect& aPreFilterDirtyRect)
|
||||
{
|
||||
if (aPreFilterDirtyRect.IsEmpty()) {
|
||||
return nsRect();
|
||||
}
|
||||
|
||||
nsSVGFilterInstance instance(aFilteredFrame, this, nullptr, nullptr,
|
||||
&aPreFilterDirtyRect);
|
||||
if (!instance.IsInitialized()) {
|
||||
return nsRect();
|
||||
}
|
||||
// We've passed in the source's dirty area so the instance knows about it.
|
||||
// Now we can ask the instance to compute the area of the filter output
|
||||
// that's dirty.
|
||||
nsIntRect dirtyRect;
|
||||
nsresult rv = instance.ComputePostFilterDirtyRect(&dirtyRect);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
return TransformFilterSpaceToFrameSpace(&instance, &dirtyRect);
|
||||
}
|
||||
return nsRect();
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsSVGFilterFrame::GetPreFilterNeededArea(nsIFrame *aFilteredFrame,
|
||||
const nsRect& aPostFilterDirtyRect)
|
||||
{
|
||||
nsSVGFilterInstance instance(aFilteredFrame, this, nullptr,
|
||||
&aPostFilterDirtyRect);
|
||||
if (!instance.IsInitialized()) {
|
||||
return nsRect();
|
||||
}
|
||||
// Now we can ask the instance to compute the area of the source
|
||||
// that's needed.
|
||||
nsIntRect neededRect;
|
||||
nsresult rv = instance.ComputeSourceNeededRect(&neededRect);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
return TransformFilterSpaceToFrameSpace(&instance, &neededRect);
|
||||
}
|
||||
return nsRect();
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsSVGFilterFrame::GetPostFilterBounds(nsIFrame *aFilteredFrame,
|
||||
const gfxRect *aOverrideBBox,
|
||||
const nsRect *aPreFilterBounds)
|
||||
{
|
||||
MOZ_ASSERT(!(aFilteredFrame->GetStateBits() & NS_FRAME_SVG_LAYOUT) ||
|
||||
!(aFilteredFrame->GetStateBits() & NS_FRAME_IS_NONDISPLAY),
|
||||
"Non-display SVG do not maintain visual overflow rects");
|
||||
|
||||
nsSVGFilterInstance instance(aFilteredFrame, this, nullptr, nullptr,
|
||||
aPreFilterBounds, aPreFilterBounds,
|
||||
aOverrideBBox);
|
||||
if (!instance.IsInitialized()) {
|
||||
return nsRect();
|
||||
}
|
||||
nsIntRect bbox;
|
||||
nsresult rv = instance.ComputePostFilterExtents(&bbox);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
return TransformFilterSpaceToFrameSpace(&instance, &bbox);
|
||||
}
|
||||
return nsRect();
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void
|
||||
nsSVGFilterFrame::Init(nsIContent* aContent,
|
||||
|
@ -57,6 +57,48 @@ public:
|
||||
nsIAtom* aAttribute,
|
||||
int32_t aModType) MOZ_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Paint the given filtered frame.
|
||||
* @param aDirtyArea The area than needs to be painted, in aFilteredFrame's
|
||||
* frame space (i.e. relative to its origin, the top-left corner of its
|
||||
* border box).
|
||||
*/
|
||||
nsresult PaintFilteredFrame(nsRenderingContext *aContext,
|
||||
nsIFrame *aFilteredFrame,
|
||||
nsSVGFilterPaintCallback *aPaintCallback,
|
||||
const nsRect* aDirtyArea,
|
||||
nsIFrame* aTransformRoot);
|
||||
|
||||
/**
|
||||
* Returns the post-filter area that could be dirtied when the given
|
||||
* pre-filter area of aFilteredFrame changes.
|
||||
* @param aPreFilterDirtyRect The pre-filter area of aFilteredFrame that has
|
||||
* changed, relative to aFilteredFrame, in app units.
|
||||
*/
|
||||
nsRect GetPostFilterDirtyArea(nsIFrame *aFilteredFrame,
|
||||
const nsRect& aPreFilterDirtyRect);
|
||||
|
||||
/**
|
||||
* Returns the pre-filter area that is needed from aFilteredFrame when the
|
||||
* given post-filter area needs to be repainted.
|
||||
* @param aPostFilterDirtyRect The post-filter area that is dirty, relative
|
||||
* to aFilteredFrame, in app units.
|
||||
*/
|
||||
nsRect GetPreFilterNeededArea(nsIFrame *aFilteredFrame,
|
||||
const nsRect& aPostFilterDirtyRect);
|
||||
|
||||
/**
|
||||
* Returns the post-filter visual overflow rect (paint bounds) of
|
||||
* aFilteredFrame.
|
||||
* @param aOverrideBBox A user space rect, in user units, that should be used
|
||||
* as aFilteredFrame's bbox ('bbox' is a specific SVG term), if non-null.
|
||||
* @param aPreFilterBounds The pre-filter visual overflow rect of
|
||||
* aFilteredFrame, if non-null.
|
||||
*/
|
||||
nsRect GetPostFilterBounds(nsIFrame *aFilteredFrame,
|
||||
const gfxRect *aOverrideBBox = nullptr,
|
||||
const nsRect *aPreFilterBounds = nullptr);
|
||||
|
||||
#ifdef DEBUG
|
||||
virtual void Init(nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
|
@ -23,105 +23,6 @@ using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
nsresult
|
||||
nsSVGFilterInstance::PaintFilteredFrame(nsSVGFilterFrame* aFilterFrame,
|
||||
nsRenderingContext *aContext,
|
||||
nsIFrame *aFilteredFrame,
|
||||
nsSVGFilterPaintCallback *aPaintCallback,
|
||||
const nsRect *aDirtyArea,
|
||||
nsIFrame* aTransformRoot)
|
||||
{
|
||||
nsSVGFilterInstance instance(aFilteredFrame, aFilterFrame, aPaintCallback,
|
||||
aDirtyArea, nullptr, nullptr, nullptr,
|
||||
aTransformRoot);
|
||||
if (!instance.IsInitialized()) {
|
||||
return NS_OK;
|
||||
}
|
||||
return instance.Render(aContext->ThebesContext());
|
||||
}
|
||||
|
||||
static nsRect
|
||||
TransformFilterSpaceToFrameSpace(nsSVGFilterInstance *aInstance,
|
||||
nsIntRect *aRect)
|
||||
{
|
||||
if (aRect->IsEmpty()) {
|
||||
return nsRect();
|
||||
}
|
||||
gfxMatrix m = aInstance->GetFilterSpaceToFrameSpaceInCSSPxTransform();
|
||||
gfxRect r(aRect->x, aRect->y, aRect->width, aRect->height);
|
||||
r = m.TransformBounds(r);
|
||||
return nsLayoutUtils::RoundGfxRectToAppRect(r, aInstance->AppUnitsPerCSSPixel());
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsSVGFilterInstance::GetPostFilterDirtyArea(nsSVGFilterFrame* aFilterFrame,
|
||||
nsIFrame *aFilteredFrame,
|
||||
const nsRect& aPreFilterDirtyRect)
|
||||
{
|
||||
if (aPreFilterDirtyRect.IsEmpty()) {
|
||||
return nsRect();
|
||||
}
|
||||
|
||||
nsSVGFilterInstance instance(aFilteredFrame, aFilterFrame, nullptr, nullptr,
|
||||
&aPreFilterDirtyRect);
|
||||
if (!instance.IsInitialized()) {
|
||||
return nsRect();
|
||||
}
|
||||
// We've passed in the source's dirty area so the instance knows about it.
|
||||
// Now we can ask the instance to compute the area of the filter output
|
||||
// that's dirty.
|
||||
nsRect dirtyRect;
|
||||
nsresult rv = instance.ComputePostFilterDirtyRect(&dirtyRect);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
return dirtyRect;
|
||||
}
|
||||
return nsRect();
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsSVGFilterInstance::GetPreFilterNeededArea(nsSVGFilterFrame* aFilterFrame,
|
||||
nsIFrame *aFilteredFrame,
|
||||
const nsRect& aPostFilterDirtyRect)
|
||||
{
|
||||
nsSVGFilterInstance instance(aFilteredFrame, aFilterFrame, nullptr,
|
||||
&aPostFilterDirtyRect);
|
||||
if (!instance.IsInitialized()) {
|
||||
return nsRect();
|
||||
}
|
||||
// Now we can ask the instance to compute the area of the source
|
||||
// that's needed.
|
||||
nsRect neededRect;
|
||||
nsresult rv = instance.ComputeSourceNeededRect(&neededRect);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
return neededRect;
|
||||
}
|
||||
return nsRect();
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsSVGFilterInstance::GetPostFilterBounds(nsSVGFilterFrame* aFilterFrame,
|
||||
nsIFrame *aFilteredFrame,
|
||||
const gfxRect *aOverrideBBox,
|
||||
const nsRect *aPreFilterBounds)
|
||||
{
|
||||
MOZ_ASSERT(!(aFilteredFrame->GetStateBits() & NS_FRAME_SVG_LAYOUT) ||
|
||||
!(aFilteredFrame->GetStateBits() & NS_FRAME_IS_NONDISPLAY),
|
||||
"Non-display SVG do not maintain visual overflow rects");
|
||||
|
||||
nsSVGFilterInstance instance(aFilteredFrame, aFilterFrame, nullptr, nullptr,
|
||||
aPreFilterBounds, aPreFilterBounds,
|
||||
aOverrideBBox);
|
||||
if (!instance.IsInitialized()) {
|
||||
return nsRect();
|
||||
}
|
||||
nsRect bbox;
|
||||
nsresult rv = instance.ComputePostFilterExtents(&bbox);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
return bbox;
|
||||
}
|
||||
return nsRect();
|
||||
}
|
||||
|
||||
nsSVGFilterInstance::nsSVGFilterInstance(nsIFrame *aTargetFrame,
|
||||
nsSVGFilterFrame *aFilterFrame,
|
||||
nsSVGFilterPaintCallback *aPaintCallback,
|
||||
@ -763,9 +664,9 @@ nsSVGFilterInstance::Render(gfxContext* aContext)
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsSVGFilterInstance::ComputePostFilterDirtyRect(nsRect* aPostFilterDirtyRect)
|
||||
nsSVGFilterInstance::ComputePostFilterDirtyRect(nsIntRect* aPostFilterDirtyRect)
|
||||
{
|
||||
*aPostFilterDirtyRect = nsRect();
|
||||
*aPostFilterDirtyRect = nsIntRect();
|
||||
if (mPreFilterDirtyRect.IsEmpty()) {
|
||||
return NS_OK;
|
||||
}
|
||||
@ -784,15 +685,14 @@ nsSVGFilterInstance::ComputePostFilterDirtyRect(nsRect* aPostFilterDirtyRect)
|
||||
nsIntRegion resultChangeRegion =
|
||||
FilterSupport::ComputeResultChangeRegion(filter,
|
||||
mPreFilterDirtyRect, nsIntRegion(), nsIntRegion());
|
||||
*aPostFilterDirtyRect =
|
||||
FilterSpaceToFrameSpace(resultChangeRegion.GetBounds());
|
||||
*aPostFilterDirtyRect = resultChangeRegion.GetBounds();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsSVGFilterInstance::ComputePostFilterExtents(nsRect* aPostFilterExtents)
|
||||
nsSVGFilterInstance::ComputePostFilterExtents(nsIntRect* aPostFilterExtents)
|
||||
{
|
||||
*aPostFilterExtents = nsRect();
|
||||
*aPostFilterExtents = nsIntRect();
|
||||
|
||||
nsresult rv = BuildPrimitives();
|
||||
if (NS_FAILED(rv))
|
||||
@ -814,12 +714,12 @@ nsSVGFilterInstance::ComputePostFilterExtents(nsRect* aPostFilterExtents)
|
||||
FilterDescription filter(mPrimitiveDescriptions, filterSpaceBounds);
|
||||
nsIntRegion postFilterExtents =
|
||||
FilterSupport::ComputePostFilterExtents(filter, sourceBoundsInt);
|
||||
*aPostFilterExtents = FilterSpaceToFrameSpace(postFilterExtents.GetBounds());
|
||||
*aPostFilterExtents = postFilterExtents.GetBounds();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsSVGFilterInstance::ComputeSourceNeededRect(nsRect* aDirty)
|
||||
nsSVGFilterInstance::ComputeSourceNeededRect(nsIntRect* aDirty)
|
||||
{
|
||||
nsresult rv = BuildPrimitives();
|
||||
if (NS_FAILED(rv))
|
||||
@ -831,7 +731,7 @@ nsSVGFilterInstance::ComputeSourceNeededRect(nsRect* aDirty)
|
||||
}
|
||||
|
||||
ComputeNeededBoxes();
|
||||
*aDirty = FilterSpaceToFrameSpace(mSourceGraphic.mNeededBounds);
|
||||
*aDirty = mSourceGraphic.mNeededBounds;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -857,17 +757,6 @@ nsSVGFilterInstance::FrameSpaceToFilterSpace(const nsRect* aRect) const
|
||||
return rect;
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsSVGFilterInstance::FilterSpaceToFrameSpace(const nsIntRect& aRect) const
|
||||
{
|
||||
if (aRect.IsEmpty()) {
|
||||
return nsRect();
|
||||
}
|
||||
gfxRect r(aRect.x, aRect.y, aRect.width, aRect.height);
|
||||
r = mFilterSpaceToFrameSpaceInCSSPxTransform.TransformBounds(r);
|
||||
return nsLayoutUtils::RoundGfxRectToAppRect(r, mAppUnitsPerCSSPx);
|
||||
}
|
||||
|
||||
gfxMatrix
|
||||
nsSVGFilterInstance::GetUserSpaceToFrameSpaceInCSSPxTransform() const
|
||||
{
|
||||
|
@ -59,52 +59,6 @@ class nsSVGFilterInstance
|
||||
typedef mozilla::gfx::FilterPrimitiveDescription FilterPrimitiveDescription;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Paint the given filtered frame.
|
||||
* @param aDirtyArea The area than needs to be painted, in aFilteredFrame's
|
||||
* frame space (i.e. relative to its origin, the top-left corner of its
|
||||
* border box).
|
||||
*/
|
||||
static nsresult PaintFilteredFrame(nsSVGFilterFrame* aFilterFrame,
|
||||
nsRenderingContext *aContext,
|
||||
nsIFrame *aFilteredFrame,
|
||||
nsSVGFilterPaintCallback *aPaintCallback,
|
||||
const nsRect* aDirtyArea,
|
||||
nsIFrame* aTransformRoot = nullptr);
|
||||
|
||||
/**
|
||||
* Returns the post-filter area that could be dirtied when the given
|
||||
* pre-filter area of aFilteredFrame changes.
|
||||
* @param aPreFilterDirtyRect The pre-filter area of aFilteredFrame that has
|
||||
* changed, relative to aFilteredFrame, in app units.
|
||||
*/
|
||||
static nsRect GetPostFilterDirtyArea(nsSVGFilterFrame* aFilterFrame,
|
||||
nsIFrame *aFilteredFrame,
|
||||
const nsRect& aPreFilterDirtyRect);
|
||||
|
||||
/**
|
||||
* Returns the pre-filter area that is needed from aFilteredFrame when the
|
||||
* given post-filter area needs to be repainted.
|
||||
* @param aPostFilterDirtyRect The post-filter area that is dirty, relative
|
||||
* to aFilteredFrame, in app units.
|
||||
*/
|
||||
static nsRect GetPreFilterNeededArea(nsSVGFilterFrame* aFilterFrame,
|
||||
nsIFrame *aFilteredFrame,
|
||||
const nsRect& aPostFilterDirtyRect);
|
||||
|
||||
/**
|
||||
* Returns the post-filter visual overflow rect (paint bounds) of
|
||||
* aFilteredFrame.
|
||||
* @param aOverrideBBox A user space rect, in user units, that should be used
|
||||
* as aFilteredFrame's bbox ('bbox' is a specific SVG term), if non-null.
|
||||
* @param aPreFilterBounds The pre-filter visual overflow rect of
|
||||
* aFilteredFrame, if non-null.
|
||||
*/
|
||||
static nsRect GetPostFilterBounds(nsSVGFilterFrame* aFilterFrame,
|
||||
nsIFrame *aFilteredFrame,
|
||||
const gfxRect *aOverrideBBox = nullptr,
|
||||
const nsRect *aPreFilterBounds = nullptr);
|
||||
|
||||
/**
|
||||
* @param aTargetFrame The frame of the filtered element under consideration.
|
||||
* @param aFilterFrame The frame of the SVG filter element.
|
||||
@ -164,31 +118,31 @@ public:
|
||||
nsresult Render(gfxContext* aContext);
|
||||
|
||||
/**
|
||||
* Sets the aPostFilterDirtyRect outparam to the post-filter bounds in frame
|
||||
* Sets the aPostFilterDirtyRect outparam to the post-filter bounds in filter
|
||||
* space of the area that would be dirtied by mTargetFrame when a given
|
||||
* pre-filter area of mTargetFrame is dirtied. The pre-filter area must have
|
||||
* been specified before calling this method by passing it as the
|
||||
* aPreFilterDirtyRect argument to the nsSVGFilterInstance constructor.
|
||||
*/
|
||||
nsresult ComputePostFilterDirtyRect(nsRect* aPostFilterDirtyRect);
|
||||
nsresult ComputePostFilterDirtyRect(nsIntRect* aPostFilterDirtyRect);
|
||||
|
||||
/**
|
||||
* Sets the aPostFilterExtents outparam to the post-filter bounds in frame
|
||||
* Sets the aPostFilterExtents outparam to the post-filter bounds in filter
|
||||
* space for the whole filter output. This is not necessarily equivalent to
|
||||
* the area that would be dirtied in the result when the entire pre-filter
|
||||
* area is dirtied, because some filter primitives can generate output
|
||||
* without any input.
|
||||
*/
|
||||
nsresult ComputePostFilterExtents(nsRect* aPostFilterExtents);
|
||||
nsresult ComputePostFilterExtents(nsIntRect* aPostFilterExtents);
|
||||
|
||||
/**
|
||||
* Sets the aDirty outparam to the pre-filter bounds in frame space of the
|
||||
* Sets the aDirty outparam to the pre-filter bounds in filter space of the
|
||||
* area of mTargetFrame that is needed in order to paint the filtered output
|
||||
* for a given post-filter dirtied area. The post-filter area must have been
|
||||
* specified before calling this method by passing it as the aPostFilterDirtyRect
|
||||
* argument to the nsSVGFilterInstance constructor.
|
||||
*/
|
||||
nsresult ComputeSourceNeededRect(nsRect* aDirty);
|
||||
nsresult ComputeSourceNeededRect(nsIntRect* aDirty);
|
||||
|
||||
float GetPrimitiveNumber(uint8_t aCtxType, const nsSVGNumber2 *aNumber) const
|
||||
{
|
||||
@ -315,7 +269,6 @@ private:
|
||||
* large to be stored in an nsIntRect.
|
||||
*/
|
||||
nsIntRect FrameSpaceToFilterSpace(const nsRect* aRect) const;
|
||||
nsRect FilterSpaceToFrameSpace(const nsIntRect& aRect) const;
|
||||
|
||||
/**
|
||||
* Returns the transform from frame space to the coordinate space that
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "nsSVGEffects.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "nsSVGFilterFrame.h"
|
||||
#include "nsSVGFilterInstance.h"
|
||||
#include "nsSVGFilterPaintCallback.h"
|
||||
#include "nsSVGMaskFrame.h"
|
||||
#include "nsSVGPaintServerFrame.h"
|
||||
@ -277,7 +276,7 @@ nsRect
|
||||
overrideBBox.RoundOut();
|
||||
|
||||
nsRect overflowRect =
|
||||
nsSVGFilterInstance::GetPostFilterBounds(filterFrame, firstFrame, &overrideBBox);
|
||||
filterFrame->GetPostFilterBounds(firstFrame, &overrideBBox);
|
||||
|
||||
// Return overflowRect relative to aFrame, rather than "user space":
|
||||
return overflowRect - (aFrame->GetOffsetTo(firstFrame) + firstFrameToUserSpace);
|
||||
@ -328,8 +327,8 @@ nsSVGIntegrationUtils::AdjustInvalidAreaForSVGEffects(nsIFrame* aFrame,
|
||||
|
||||
// Adjust the dirty area for effects, and shift it back to being relative to
|
||||
// the reference frame.
|
||||
nsRect result = nsSVGFilterInstance::GetPostFilterDirtyArea(filterFrame,
|
||||
firstFrame, preEffectsRect) - toUserSpace;
|
||||
nsRect result = filterFrame->GetPostFilterDirtyArea(firstFrame, preEffectsRect) -
|
||||
toUserSpace;
|
||||
// Return the result, in pixels relative to the reference frame.
|
||||
return result.ToOutsidePixels(appUnitsPerDevPixel);
|
||||
}
|
||||
@ -353,8 +352,8 @@ nsSVGIntegrationUtils::GetRequiredSourceForInvalidArea(nsIFrame* aFrame,
|
||||
nsRect postEffectsRect = aDirtyRect + toUserSpace;
|
||||
|
||||
// Return ther result, relative to aFrame, not in user space:
|
||||
return nsSVGFilterInstance::GetPreFilterNeededArea(filterFrame, firstFrame,
|
||||
postEffectsRect) - toUserSpace;
|
||||
return filterFrame->GetPreFilterNeededArea(firstFrame, postEffectsRect) -
|
||||
toUserSpace;
|
||||
}
|
||||
|
||||
bool
|
||||
@ -518,8 +517,7 @@ nsSVGIntegrationUtils::PaintFramesWithEffects(nsRenderingContext* aCtx,
|
||||
RegularFramePaintCallback callback(aBuilder, aLayerManager,
|
||||
offsetWithoutSVGGeomFramePos);
|
||||
nsRect dirtyRect = aDirtyRect - offset;
|
||||
nsSVGFilterInstance::PaintFilteredFrame(filterFrame, aCtx, aFrame,
|
||||
&callback, &dirtyRect);
|
||||
filterFrame->PaintFilteredFrame(aCtx, aFrame, &callback, &dirtyRect, nullptr);
|
||||
} else {
|
||||
gfx->SetMatrix(matrixAutoSaveRestore.Matrix());
|
||||
aLayerManager->EndTransaction(FrameLayerBuilder::DrawThebesLayer, aBuilder);
|
||||
|
@ -36,7 +36,6 @@
|
||||
#include "nsSVGContainerFrame.h"
|
||||
#include "nsSVGEffects.h"
|
||||
#include "nsSVGFilterFrame.h"
|
||||
#include "nsSVGFilterInstance.h"
|
||||
#include "nsSVGFilterPaintCallback.h"
|
||||
#include "nsSVGForeignObjectFrame.h"
|
||||
#include "gfxSVGGlyphs.h"
|
||||
@ -160,13 +159,12 @@ nsSVGUtils::GetPostFilterVisualOverflowRect(nsIFrame *aFrame,
|
||||
NS_ABORT_IF_FALSE(aFrame->GetStateBits() & NS_FRAME_SVG_LAYOUT,
|
||||
"Called on invalid frame type");
|
||||
|
||||
nsSVGFilterFrame *filterFrame = nsSVGEffects::GetFilterFrame(aFrame);
|
||||
if (!filterFrame) {
|
||||
nsSVGFilterFrame *filter = nsSVGEffects::GetFilterFrame(aFrame);
|
||||
if (!filter) {
|
||||
return aPreFilterRect;
|
||||
}
|
||||
|
||||
return nsSVGFilterInstance::GetPostFilterBounds(filterFrame, aFrame, nullptr,
|
||||
&aPreFilterRect);
|
||||
return filter->GetPostFilterBounds(aFrame, nullptr, &aPreFilterRect);
|
||||
}
|
||||
|
||||
bool
|
||||
@ -623,9 +621,7 @@ nsSVGUtils::PaintFrameWithEffects(nsRenderingContext *aContext,
|
||||
dirtyRect = &tmpDirtyRect;
|
||||
}
|
||||
SVGPaintCallback paintCallback;
|
||||
nsSVGFilterInstance::PaintFilteredFrame(filterFrame, aContext, aFrame,
|
||||
&paintCallback, dirtyRect,
|
||||
aTransformRoot);
|
||||
filterFrame->PaintFilteredFrame(aContext, aFrame, &paintCallback, dirtyRect, aTransformRoot);
|
||||
} else {
|
||||
svgChildFrame->PaintSVG(aContext, aDirtyRect, aTransformRoot);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user