Bug 1883287 - Don't wait for the hidden window to be created on Linux to load the...
[gecko.git] / gfx / layers / ImageTypes.h
blob96021ba9f6b4a96ab0f1133caf9d917eea41b0e7
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef GFX_IMAGETYPES_H
8 #define GFX_IMAGETYPES_H
10 #include <stdint.h> // for uint32_t
12 namespace mozilla {
14 enum class ImageFormat {
15 /**
16 * The PLANAR_YCBCR format creates a PlanarYCbCrImage. All backends should
17 * support this format, because the Ogg video decoder depends on it.
18 * The maximum image width and height is 16384.
20 PLANAR_YCBCR,
22 /**
23 * The NV_IMAGE format creates a NVImage. The PLANAR_YCBCR together with this
24 * complete the YUV format family.
26 NV_IMAGE,
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.
33 SHARED_RGB,
35 /**
36 * The MOZ2D_SURFACE format creates a SourceSurfaceImage. All backends should
37 * support this format, because video rendering sometimes requires it.
39 * This format is useful even though a PaintedLayer 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.
44 MOZ2D_SURFACE,
46 /**
47 * A MacIOSurface object.
49 MAC_IOSURFACE,
51 /**
52 * An Android SurfaceTexture ID that can be shared across threads and
53 * processes.
55 SURFACE_TEXTURE,
57 /**
58 * The D3D9_RGB32_TEXTURE format creates a D3D9SurfaceImage, and wraps a
59 * IDirect3DTexture9 in RGB32 layout.
61 D3D9_RGB32_TEXTURE,
63 /**
64 * An Image type carries an opaque handle once for each stream.
65 * The opaque handle would be a platform specific identifier.
67 OVERLAY_IMAGE,
69 /**
70 * A share handle to a ID3D11Texture2D.
72 D3D11_SHARE_HANDLE_TEXTURE,
74 /**
75 * A wrapper of ID3D11Texture2D of IMFSample.
76 * Expected to be used in GPU process.
78 D3D11_TEXTURE_IMF_SAMPLE,
80 /**
81 * A wrapper around a drawable TextureClient.
83 TEXTURE_WRAPPER,
85 /**
86 * A D3D11 backed YUV image.
88 D3D11_YCBCR_IMAGE,
90 /**
91 * An opaque handle that refers to an Image stored in the GPU
92 * process.
94 GPU_VIDEO,
96 /**
97 * The DMABUF format creates a SharedDMABUFImage, which stores YUV
98 * data in DMABUF memory. Used by VAAPI decoder on Linux.
100 DMABUF,
103 * A Wrapper of Dcomp surface handle, used by the windows media foundation
104 * media engine playback.
106 DCOMP_SURFACE,
109 enum class StereoMode {
110 MONO,
111 LEFT_RIGHT,
112 RIGHT_LEFT,
113 BOTTOM_TOP,
114 TOP_BOTTOM,
115 MAX,
118 namespace layers {
120 typedef uint32_t ContainerFrameID;
121 constexpr ContainerFrameID kContainerFrameID_Invalid = 0;
123 typedef uint32_t ContainerProducerID;
124 constexpr ContainerProducerID kContainerProducerID_Invalid = 0;
126 } // namespace layers
128 } // namespace mozilla
130 #endif