diff --git a/gfx/2d/DrawTargetCapture.cpp b/gfx/2d/DrawTargetCapture.cpp index 5f48174420b7..a172b0e9495f 100644 --- a/gfx/2d/DrawTargetCapture.cpp +++ b/gfx/2d/DrawTargetCapture.cpp @@ -399,5 +399,11 @@ DrawTargetCaptureImpl::MarkChanged() mSnapshot = nullptr; } +already_AddRefed +DrawTargetCaptureImpl::CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFormat) const +{ + return MakeAndAddRef(GetBackendType(), aSize, aFormat); +} + } // namespace gfx } // namespace mozilla diff --git a/gfx/2d/DrawTargetCapture.h b/gfx/2d/DrawTargetCapture.h index 60cd6939a316..355031516acc 100644 --- a/gfx/2d/DrawTargetCapture.h +++ b/gfx/2d/DrawTargetCapture.h @@ -127,10 +127,7 @@ public: } virtual already_AddRefed - CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFormat) const override - { - return mRefDT->CreateSimilarDrawTarget(aSize, aFormat); - } + CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFormat) const override; virtual already_AddRefed CreatePathBuilder(FillRule aFillRule = FillRule::FILL_WINDING) const override {