|
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/. */ |
|
5 |
|
6 #ifndef GFX_IMAGETYPES_H |
|
7 #define GFX_IMAGETYPES_H |
|
8 |
|
9 #include "mozilla/TypedEnum.h" |
|
10 |
|
11 namespace mozilla { |
|
12 |
|
13 MOZ_BEGIN_ENUM_CLASS(ImageFormat) |
|
14 /** |
|
15 * The PLANAR_YCBCR format creates a PlanarYCbCrImage. All backends should |
|
16 * support this format, because the Ogg video decoder depends on it. |
|
17 * The maximum image width and height is 16384. |
|
18 */ |
|
19 PLANAR_YCBCR, |
|
20 |
|
21 /** |
|
22 * The GRALLOC_PLANAR_YCBCR format creates a GrallocImage, a subtype of |
|
23 * PlanarYCbCrImage. It takes a PlanarYCbCrImage data or the raw gralloc |
|
24 * data and can be used as a texture by Gonk backend directly. |
|
25 */ |
|
26 GRALLOC_PLANAR_YCBCR, |
|
27 |
|
28 /** |
|
29 * The SHARED_RGB format creates a SharedRGBImage, which stores RGB data in |
|
30 * shared memory. Some Android hardware video decoders require this format. |
|
31 * Currently only used on Android. |
|
32 */ |
|
33 SHARED_RGB, |
|
34 |
|
35 /** |
|
36 * The CAIRO_SURFACE format creates a CairoImage. All backends should |
|
37 * support this format, because video rendering sometimes requires it. |
|
38 * |
|
39 * This format is useful even though a ThebesLayer could be used. |
|
40 * It makes it easy to render a cairo surface when another Image format |
|
41 * could be used. It can also avoid copying the surface data in some |
|
42 * cases. |
|
43 * |
|
44 * Images in CAIRO_SURFACE format should only be created and |
|
45 * manipulated on the main thread, since the underlying cairo surface |
|
46 * is main-thread-only. |
|
47 */ |
|
48 CAIRO_SURFACE, |
|
49 |
|
50 /** |
|
51 * A MacIOSurface object. |
|
52 */ |
|
53 MAC_IOSURFACE, |
|
54 |
|
55 /** |
|
56 * An bitmap image that can be shared with a remote process. |
|
57 */ |
|
58 REMOTE_IMAGE_BITMAP, |
|
59 |
|
60 /** |
|
61 * A OpenGL texture that can be shared across threads or processes |
|
62 */ |
|
63 SHARED_TEXTURE, |
|
64 |
|
65 /** |
|
66 * An DXGI shared surface handle that can be shared with a remote process. |
|
67 */ |
|
68 REMOTE_IMAGE_DXGI_TEXTURE, |
|
69 |
|
70 /** |
|
71 * The D3D9_RGB32_TEXTURE format creates a D3D9SurfaceImage, and wraps a |
|
72 * IDirect3DTexture9 in RGB32 layout. |
|
73 */ |
|
74 D3D9_RGB32_TEXTURE |
|
75 MOZ_END_ENUM_CLASS(ImageFormat) |
|
76 |
|
77 MOZ_BEGIN_ENUM_CLASS(StereoMode) |
|
78 MONO, |
|
79 LEFT_RIGHT, |
|
80 RIGHT_LEFT, |
|
81 BOTTOM_TOP, |
|
82 TOP_BOTTOM |
|
83 MOZ_END_ENUM_CLASS(StereoMode) |
|
84 |
|
85 } // namespace |
|
86 |
|
87 #endif |