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/. */
6 #ifndef SURFACE_TYPES_H_
7 #define SURFACE_TYPES_H_
9 #include "mozilla/TypedEnum.h"
10 #include "mozilla/RefPtr.h"
11 #include "mozilla/Attributes.h"
16 class ISurfaceAllocator
;
21 struct SurfaceCaps MOZ_FINAL
30 // The surface allocator that we want to create this
32 RefPtr
<layers::ISurfaceAllocator
> surfaceAllocator
;
35 SurfaceCaps(const SurfaceCaps
& other
);
40 SurfaceCaps
& operator=(const SurfaceCaps
& other
);
42 // We can't use just 'RGB' here, since it's an ancient Windows macro.
43 static SurfaceCaps
ForRGB() {
51 static SurfaceCaps
ForRGBA() {
60 static SurfaceCaps
Any() {
69 MOZ_BEGIN_ENUM_CLASS(SharedSurfaceType
, uint8_t)
82 MOZ_END_ENUM_CLASS(SharedSurfaceType
)
85 MOZ_BEGIN_ENUM_CLASS(SurfaceStreamType
, uint8_t)
91 MOZ_END_ENUM_CLASS(SurfaceStreamType
)
94 MOZ_BEGIN_ENUM_CLASS(AttachmentType
, uint8_t)
101 MOZ_END_ENUM_CLASS(AttachmentType
)
103 } /* namespace gfx */
104 } /* namespace mozilla */
106 #endif /* SURFACE_TYPES_H_ */