1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
9 #include "DrawTargetCapture.h"
14 TemporaryRef
<DrawTargetCapture
>
15 DrawTarget::CreateCaptureDT(const IntSize
& aSize
)
17 RefPtr
<DrawTargetCaptureImpl
> dt
= new DrawTargetCaptureImpl();
19 if (!dt
->Init(aSize
, this)) {
20 gfxWarning() << "Failed to initialize Capture DrawTarget!";
28 DrawTarget::DrawCapturedDT(DrawTargetCapture
*aCaptureDT
,
29 const Matrix
& aTransform
)
31 if (aTransform
.HasNonIntegerTranslation()) {
32 gfxWarning() << "Non integer translations are not supported for DrawCaptureDT at this time!";
35 static_cast<DrawTargetCaptureImpl
*>(aCaptureDT
)->ReplayToDrawTarget(this, aTransform
);