зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1404181 - Part 7: Add a way to check if existing painted items might need to be redrawn for a sync decode. r=mstange
MozReview-Commit-ID: 98qxakaKolI --HG-- extra : rebase_source : 079fe441ed82ef59b4300fc9d1a8ce5f0cf51b7b
This commit is contained in:
Родитель
7aeb11cd77
Коммит
17aef36fd6
|
@ -188,6 +188,11 @@ public:
|
|||
mOrdinal = f->GetOrdinal();
|
||||
}
|
||||
|
||||
virtual bool InvalidateForSyncDecodeImages() const override
|
||||
{
|
||||
return ShouldInvalidateToSyncDecodeImages();
|
||||
}
|
||||
|
||||
int32_t mOrdinal;
|
||||
};
|
||||
|
||||
|
|
|
@ -915,6 +915,11 @@ public:
|
|||
{
|
||||
return LAYER_ACTIVE;
|
||||
}
|
||||
|
||||
virtual nsDisplayItemGeometry* AllocateGeometry(nsDisplayListBuilder* aBuilder) override
|
||||
{
|
||||
return new nsDisplayPluginGeometry(this, aBuilder);
|
||||
}
|
||||
};
|
||||
|
||||
static nsRect
|
||||
|
|
|
@ -348,6 +348,21 @@ private:
|
|||
mozilla::UniquePtr<PluginFrameDidCompositeObserver> mDidCompositeObserver;
|
||||
};
|
||||
|
||||
class nsDisplayPluginGeometry : public nsDisplayItemGenericGeometry
|
||||
{
|
||||
public:
|
||||
nsDisplayPluginGeometry(nsDisplayItem *aItem, nsDisplayListBuilder* aBuilder)
|
||||
: nsDisplayItemGenericGeometry(aItem, aBuilder)
|
||||
{}
|
||||
|
||||
// Plugins MozPaintWait event depends on sync decode, so we always want
|
||||
// to rebuild the display list when sync decoding.
|
||||
virtual bool InvalidateForSyncDecodeImages() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class nsDisplayPlugin : public nsDisplayItem {
|
||||
public:
|
||||
nsDisplayPlugin(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame)
|
||||
|
@ -391,6 +406,11 @@ public:
|
|||
aManager);
|
||||
}
|
||||
|
||||
virtual nsDisplayItemGeometry* AllocateGeometry(nsDisplayListBuilder* aBuilder) override
|
||||
{
|
||||
return new nsDisplayPluginGeometry(this, aBuilder);
|
||||
}
|
||||
|
||||
virtual bool CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
|
||||
mozilla::wr::IpcResourceUpdateQueue& aResources,
|
||||
const StackingContextHelper& aSc,
|
||||
|
|
|
@ -61,6 +61,11 @@ public:
|
|||
mBounds.MoveBy(aOffset);
|
||||
}
|
||||
|
||||
virtual bool InvalidateForSyncDecodeImages() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bounds of the display item
|
||||
*/
|
||||
|
@ -170,6 +175,11 @@ public:
|
|||
: nsDisplayItemGenericGeometry(aItem, aBuilder)
|
||||
, nsImageGeometryMixin(aItem, aBuilder)
|
||||
{ }
|
||||
|
||||
virtual bool InvalidateForSyncDecodeImages() const override
|
||||
{
|
||||
return ShouldInvalidateToSyncDecodeImages();
|
||||
}
|
||||
};
|
||||
|
||||
class nsDisplayItemBoundsGeometry : public nsDisplayItemGeometry
|
||||
|
@ -189,6 +199,11 @@ public:
|
|||
|
||||
virtual void MoveBy(const nsPoint& aOffset) override;
|
||||
|
||||
virtual bool InvalidateForSyncDecodeImages() const override
|
||||
{
|
||||
return ShouldInvalidateToSyncDecodeImages();
|
||||
}
|
||||
|
||||
nsRect mContentRect;
|
||||
};
|
||||
|
||||
|
@ -201,6 +216,11 @@ public:
|
|||
|
||||
virtual void MoveBy(const nsPoint& aOffset) override;
|
||||
|
||||
virtual bool InvalidateForSyncDecodeImages() const override
|
||||
{
|
||||
return ShouldInvalidateToSyncDecodeImages();
|
||||
}
|
||||
|
||||
nsRect mPositioningArea;
|
||||
nsRect mDestRect;
|
||||
};
|
||||
|
@ -286,6 +306,11 @@ class nsDisplayMaskGeometry : public nsDisplaySVGEffectGeometry
|
|||
public:
|
||||
nsDisplayMaskGeometry(nsDisplayMask* aItem, nsDisplayListBuilder* aBuilder);
|
||||
|
||||
virtual bool InvalidateForSyncDecodeImages() const override
|
||||
{
|
||||
return ShouldInvalidateToSyncDecodeImages();
|
||||
}
|
||||
|
||||
nsTArray<nsRect> mDestRects;
|
||||
};
|
||||
|
||||
|
@ -295,6 +320,11 @@ class nsDisplayFilterGeometry : public nsDisplaySVGEffectGeometry
|
|||
public:
|
||||
nsDisplayFilterGeometry(nsDisplayFilter* aItem,
|
||||
nsDisplayListBuilder* aBuilder);
|
||||
|
||||
virtual bool InvalidateForSyncDecodeImages() const override
|
||||
{
|
||||
return ShouldInvalidateToSyncDecodeImages();
|
||||
}
|
||||
};
|
||||
|
||||
class nsCharClipGeometry : public nsDisplayItemGenericGeometry
|
||||
|
@ -316,6 +346,11 @@ public:
|
|||
nsDisplayListBuilder* aBuilder,
|
||||
const nsPoint& aFrameOffsetToViewport);
|
||||
|
||||
virtual bool InvalidateForSyncDecodeImages() const override
|
||||
{
|
||||
return ShouldInvalidateToSyncDecodeImages();
|
||||
}
|
||||
|
||||
nsPoint mFrameOffsetToViewport;
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче