Bug 853551 - Implement the doppler part of AudioPannerNode. r=ehsan
[gecko.git] / gfx / layers / ImageTypes.h
blob4791365fe43f2247e8d4decbb3546b15349d7f31
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/. */
6 #ifndef GFX_IMAGETYPES_H
7 #define GFX_IMAGETYPES_H
9 namespace mozilla {
11 enum ImageFormat {
12 /**
13 * The PLANAR_YCBCR format creates a PlanarYCbCrImage. All backends should
14 * support this format, because the Ogg video decoder depends on it.
15 * The maximum image width and height is 16384.
17 PLANAR_YCBCR,
19 /**
20 * The GRALLOC_PLANAR_YCBCR format creates a GrallocPlanarYCbCrImage, a
21 * subtype of PlanarYCbCrImage. It takes a PlanarYCbCrImage data and can be
22 * used as a texture by Gonk backend directly.
24 GRALLOC_PLANAR_YCBCR,
26 /**
27 * The SHARED_RGB format creates a SharedRGBImage, which stores RGB data in
28 * shared memory. Some Android hardware video decoders require this format.
29 * Currently only used on Android.
31 SHARED_RGB,
33 /**
34 * The CAIRO_SURFACE format creates a CairoImage. All backends should
35 * support this format, because video rendering sometimes requires it.
37 * This format is useful even though a ThebesLayer could be used.
38 * It makes it easy to render a cairo surface when another Image format
39 * could be used. It can also avoid copying the surface data in some
40 * cases.
42 * Images in CAIRO_SURFACE format should only be created and
43 * manipulated on the main thread, since the underlying cairo surface
44 * is main-thread-only.
46 CAIRO_SURFACE,
48 /**
49 * The MAC_IO_SURFACE format creates a MacIOSurfaceImage.
51 * It wraps an IOSurface object and binds it directly to a GL texture.
53 MAC_IO_SURFACE,
55 /**
56 * The GONK_IO_SURFACE format creates a GonkIOSurfaceImage.
58 * It wraps an GraphicBuffer object and binds it directly to a GL texture.
60 GONK_IO_SURFACE,
62 /**
63 * An bitmap image that can be shared with a remote process.
65 REMOTE_IMAGE_BITMAP,
67 /**
68 * A OpenGL texture that can be shared across threads or processes
70 SHARED_TEXTURE,
72 /**
73 * An DXGI shared surface handle that can be shared with a remote process.
75 REMOTE_IMAGE_DXGI_TEXTURE
79 enum StereoMode {
80 STEREO_MODE_MONO,
81 STEREO_MODE_LEFT_RIGHT,
82 STEREO_MODE_RIGHT_LEFT,
83 STEREO_MODE_BOTTOM_TOP,
84 STEREO_MODE_TOP_BOTTOM
88 } // namespace
90 #endif