|
1 /* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */ |
|
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/. */ |
|
5 |
|
6 #include "SurfaceTypes.h" |
|
7 #include "mozilla/layers/ISurfaceAllocator.h" |
|
8 |
|
9 namespace mozilla { |
|
10 namespace gfx { |
|
11 |
|
12 SurfaceCaps::SurfaceCaps() |
|
13 { |
|
14 Clear(); |
|
15 } |
|
16 |
|
17 SurfaceCaps::SurfaceCaps(const SurfaceCaps& other) |
|
18 { |
|
19 *this = other; |
|
20 } |
|
21 |
|
22 SurfaceCaps& |
|
23 SurfaceCaps::operator=(const SurfaceCaps& other) |
|
24 { |
|
25 any = other.any; |
|
26 color = other.color; |
|
27 alpha = other.alpha; |
|
28 bpp16 = other.bpp16; |
|
29 depth = other.depth; |
|
30 stencil = other.stencil; |
|
31 antialias = other.antialias; |
|
32 preserve = other.preserve; |
|
33 surfaceAllocator = other.surfaceAllocator; |
|
34 |
|
35 return *this; |
|
36 } |
|
37 |
|
38 void |
|
39 SurfaceCaps::Clear() |
|
40 { |
|
41 any = false; |
|
42 color = false; |
|
43 alpha = false; |
|
44 bpp16 = false; |
|
45 depth = false; |
|
46 stencil = false; |
|
47 antialias = false; |
|
48 preserve = false; |
|
49 surfaceAllocator = nullptr; |
|
50 } |
|
51 |
|
52 |
|
53 |
|
54 SurfaceCaps::~SurfaceCaps() |
|
55 { |
|
56 } |
|
57 |
|
58 } |
|
59 } |