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
14 enum class ImageFormat
{
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.
23 * The NV_IMAGE format creates a NVImage. The PLANAR_YCBCR together with this
24 * complete the YUV format family.
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.
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
47 * A MacIOSurface object.
52 * An Android SurfaceTexture ID that can be shared across threads and
58 * The D3D9_RGB32_TEXTURE format creates a D3D9SurfaceImage, and wraps a
59 * IDirect3DTexture9 in RGB32 layout.
64 * An Image type carries an opaque handle once for each stream.
65 * The opaque handle would be a platform specific identifier.
70 * A share handle to a ID3D11Texture2D.
72 D3D11_SHARE_HANDLE_TEXTURE
,
75 * A wrapper of ID3D11Texture2D of IMFSample.
76 * Expected to be used in GPU process.
78 D3D11_TEXTURE_IMF_SAMPLE
,
81 * A wrapper around a drawable TextureClient.
86 * A D3D11 backed YUV image.
91 * An opaque handle that refers to an Image stored in the GPU
97 * The DMABUF format creates a SharedDMABUFImage, which stores YUV
98 * data in DMABUF memory. Used by VAAPI decoder on Linux.
103 * A Wrapper of Dcomp surface handle, used by the windows media foundation
104 * media engine playback.
109 enum class StereoMode
{
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