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/. */
6 #ifndef MOZILLA_GFX_SOURCESURFACEDUAL_H_
7 #define MOZILLA_GFX_SOURCESURFACEDUAL_H_
17 class SourceSurfaceDual
: public SourceSurface
20 SourceSurfaceDual(DrawTarget
*aDTA
, DrawTarget
*aDTB
)
21 : mA(aDTA
->Snapshot())
22 , mB(aDTB
->Snapshot())
25 virtual SurfaceType
GetType() const { return SURFACE_DUAL_DT
; }
26 virtual IntSize
GetSize() const { return mA
->GetSize(); }
27 virtual SurfaceFormat
GetFormat() const { return mA
->GetFormat(); }
29 /* Readback from this surface type is not supported! */
30 virtual TemporaryRef
<DataSourceSurface
> GetDataSurface() { return nullptr; }
32 friend class DualSurface
;
33 friend class DualPattern
;
35 RefPtr
<SourceSurface
> mA
;
36 RefPtr
<SourceSurface
> mB
;
42 #endif /* MOZILLA_GFX_SOURCESURFACEDUAL_H_ */