When similar draw targets are requested from capturing DTs, always return a new capturing DT instead of an actual surface. (bug 1395478 part 9, r=mchang)

--HG--
extra : rebase_source : 9957e68435e69d65e3f4fa82bc870e37b21392dd
This commit is contained in:
David Anderson 2017-10-31 12:02:32 -07:00
parent 9956a762ef
commit 3bc0066b70
2 changed files with 7 additions and 4 deletions

View File

@ -399,5 +399,11 @@ DrawTargetCaptureImpl::MarkChanged()
mSnapshot = nullptr;
}
already_AddRefed<DrawTarget>
DrawTargetCaptureImpl::CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFormat) const
{
return MakeAndAddRef<DrawTargetCaptureImpl>(GetBackendType(), aSize, aFormat);
}
} // namespace gfx
} // namespace mozilla

View File

@ -127,10 +127,7 @@ public:
}
virtual already_AddRefed<DrawTarget>
CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFormat) const override
{
return mRefDT->CreateSimilarDrawTarget(aSize, aFormat);
}
CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFormat) const override;
virtual already_AddRefed<PathBuilder> CreatePathBuilder(FillRule aFillRule = FillRule::FILL_WINDING) const override
{