Report a DrawTargetTiled as a capture if it is made of captures (
bug 1425056, r=bas)
This will make it so that we avoid main thread rasterization for box shadows.
MozReview-Commit-ID: 9Tg4dsH21V6
--- a/gfx/2d/DrawTargetTiled.h
+++ b/gfx/2d/DrawTargetTiled.h
@@ -37,16 +37,17 @@ class DrawTargetTiled : public DrawTarge
{
public:
DrawTargetTiled();
bool Init(const TileSet& mTiles);
virtual bool IsTiledDrawTarget() const override { return true; }
+ virtual bool IsCaptureDT() const override { return mTiles[0].mDrawTarget->IsCaptureDT(); }
virtual DrawTargetType GetType() const override { return mTiles[0].mDrawTarget->GetType(); }
virtual BackendType GetBackendType() const override { return mTiles[0].mDrawTarget->GetBackendType(); }
virtual already_AddRefed<SourceSurface> Snapshot() override;
virtual void DetachAllSnapshots() override;
virtual IntSize GetSize() override {
MOZ_ASSERT(mRect.Width() > 0 && mRect.Height() > 0);
return IntSize(mRect.XMost(), mRect.YMost());
}