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 CAIRO_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
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.
51 * A MacIOSurface object.
56 * An Android SurfaceTexture ID that can be shared across threads and
62 * The D3D9_RGB32_TEXTURE format creates a D3D9SurfaceImage, and wraps a
63 * IDirect3DTexture9 in RGB32 layout.
68 * An Image type carries an opaque handle once for each stream.
69 * The opaque handle would be a platform specific identifier.
74 * A share handle to a ID3D11Texture2D.
76 D3D11_SHARE_HANDLE_TEXTURE
,
79 * A wrapper around a drawable TextureClient.
84 * A D3D11 backed YUV image.
89 * An opaque handle that refers to an Image stored in the GPU
95 * The WAYLAND_DMABUF format creates a SharedDMABUFImage, which stores YUV
96 * data in DMABUF memory. Used on Wayland by VAAPI decoder.
101 enum class StereoMode
{
112 typedef uint32_t ContainerFrameID
;
113 constexpr ContainerFrameID kContainerFrameID_Invalid
= 0;
115 typedef uint32_t ContainerProducerID
;
116 constexpr ContainerProducerID kContainerProducerID_Invalid
= 0;
118 } // namespace layers
120 } // namespace mozilla