michael@0: /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef GFX_IMAGETYPES_H michael@0: #define GFX_IMAGETYPES_H michael@0: michael@0: #include "mozilla/TypedEnum.h" michael@0: michael@0: namespace mozilla { michael@0: michael@0: MOZ_BEGIN_ENUM_CLASS(ImageFormat) michael@0: /** michael@0: * The PLANAR_YCBCR format creates a PlanarYCbCrImage. All backends should michael@0: * support this format, because the Ogg video decoder depends on it. michael@0: * The maximum image width and height is 16384. michael@0: */ michael@0: PLANAR_YCBCR, michael@0: michael@0: /** michael@0: * The GRALLOC_PLANAR_YCBCR format creates a GrallocImage, a subtype of michael@0: * PlanarYCbCrImage. It takes a PlanarYCbCrImage data or the raw gralloc michael@0: * data and can be used as a texture by Gonk backend directly. michael@0: */ michael@0: GRALLOC_PLANAR_YCBCR, michael@0: michael@0: /** michael@0: * The SHARED_RGB format creates a SharedRGBImage, which stores RGB data in michael@0: * shared memory. Some Android hardware video decoders require this format. michael@0: * Currently only used on Android. michael@0: */ michael@0: SHARED_RGB, michael@0: michael@0: /** michael@0: * The CAIRO_SURFACE format creates a CairoImage. All backends should michael@0: * support this format, because video rendering sometimes requires it. michael@0: * michael@0: * This format is useful even though a ThebesLayer could be used. michael@0: * It makes it easy to render a cairo surface when another Image format michael@0: * could be used. It can also avoid copying the surface data in some michael@0: * cases. michael@0: * michael@0: * Images in CAIRO_SURFACE format should only be created and michael@0: * manipulated on the main thread, since the underlying cairo surface michael@0: * is main-thread-only. michael@0: */ michael@0: CAIRO_SURFACE, michael@0: michael@0: /** michael@0: * A MacIOSurface object. michael@0: */ michael@0: MAC_IOSURFACE, michael@0: michael@0: /** michael@0: * An bitmap image that can be shared with a remote process. michael@0: */ michael@0: REMOTE_IMAGE_BITMAP, michael@0: michael@0: /** michael@0: * A OpenGL texture that can be shared across threads or processes michael@0: */ michael@0: SHARED_TEXTURE, michael@0: michael@0: /** michael@0: * An DXGI shared surface handle that can be shared with a remote process. michael@0: */ michael@0: REMOTE_IMAGE_DXGI_TEXTURE, michael@0: michael@0: /** michael@0: * The D3D9_RGB32_TEXTURE format creates a D3D9SurfaceImage, and wraps a michael@0: * IDirect3DTexture9 in RGB32 layout. michael@0: */ michael@0: D3D9_RGB32_TEXTURE michael@0: MOZ_END_ENUM_CLASS(ImageFormat) michael@0: michael@0: MOZ_BEGIN_ENUM_CLASS(StereoMode) michael@0: MONO, michael@0: LEFT_RIGHT, michael@0: RIGHT_LEFT, michael@0: BOTTOM_TOP, michael@0: TOP_BOTTOM michael@0: MOZ_END_ENUM_CLASS(StereoMode) michael@0: michael@0: } // namespace michael@0: michael@0: #endif