gfx/layers/ImageTypes.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/layers/ImageTypes.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,87 @@
     1.4 +/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     1.5 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef GFX_IMAGETYPES_H
    1.10 +#define GFX_IMAGETYPES_H
    1.11 +
    1.12 +#include "mozilla/TypedEnum.h"
    1.13 +
    1.14 +namespace mozilla {
    1.15 +
    1.16 +MOZ_BEGIN_ENUM_CLASS(ImageFormat)
    1.17 +  /**
    1.18 +   * The PLANAR_YCBCR format creates a PlanarYCbCrImage. All backends should
    1.19 +   * support this format, because the Ogg video decoder depends on it.
    1.20 +   * The maximum image width and height is 16384.
    1.21 +   */
    1.22 +  PLANAR_YCBCR,
    1.23 +
    1.24 +  /**
    1.25 +   * The GRALLOC_PLANAR_YCBCR format creates a GrallocImage, a subtype of
    1.26 +   * PlanarYCbCrImage. It takes a PlanarYCbCrImage data or the raw gralloc
    1.27 +   * data and can be used as a texture by Gonk backend directly.
    1.28 +   */
    1.29 +  GRALLOC_PLANAR_YCBCR,
    1.30 +
    1.31 +  /**
    1.32 +   * The SHARED_RGB format creates a SharedRGBImage, which stores RGB data in
    1.33 +   * shared memory. Some Android hardware video decoders require this format.
    1.34 +   * Currently only used on Android.
    1.35 +   */
    1.36 +  SHARED_RGB,
    1.37 +
    1.38 +  /**
    1.39 +   * The CAIRO_SURFACE format creates a CairoImage. All backends should
    1.40 +   * support this format, because video rendering sometimes requires it.
    1.41 +   *
    1.42 +   * This format is useful even though a ThebesLayer could be used.
    1.43 +   * It makes it easy to render a cairo surface when another Image format
    1.44 +   * could be used. It can also avoid copying the surface data in some
    1.45 +   * cases.
    1.46 +   *
    1.47 +   * Images in CAIRO_SURFACE format should only be created and
    1.48 +   * manipulated on the main thread, since the underlying cairo surface
    1.49 +   * is main-thread-only.
    1.50 +   */
    1.51 +  CAIRO_SURFACE,
    1.52 +
    1.53 +  /**
    1.54 +   * A MacIOSurface object.
    1.55 +   */
    1.56 +  MAC_IOSURFACE,
    1.57 +
    1.58 +  /**
    1.59 +   * An bitmap image that can be shared with a remote process.
    1.60 +   */
    1.61 +  REMOTE_IMAGE_BITMAP,
    1.62 +
    1.63 +  /**
    1.64 +   * A OpenGL texture that can be shared across threads or processes
    1.65 +   */
    1.66 +  SHARED_TEXTURE,
    1.67 +
    1.68 +  /**
    1.69 +   * An DXGI shared surface handle that can be shared with a remote process.
    1.70 +   */
    1.71 +  REMOTE_IMAGE_DXGI_TEXTURE,
    1.72 +
    1.73 +  /**
    1.74 +   * The D3D9_RGB32_TEXTURE format creates a D3D9SurfaceImage, and wraps a
    1.75 +   * IDirect3DTexture9 in RGB32 layout.
    1.76 +   */
    1.77 +  D3D9_RGB32_TEXTURE
    1.78 +MOZ_END_ENUM_CLASS(ImageFormat)
    1.79 +
    1.80 +MOZ_BEGIN_ENUM_CLASS(StereoMode)
    1.81 +  MONO,
    1.82 +  LEFT_RIGHT,
    1.83 +  RIGHT_LEFT,
    1.84 +  BOTTOM_TOP,
    1.85 +  TOP_BOTTOM
    1.86 +MOZ_END_ENUM_CLASS(StereoMode)
    1.87 +
    1.88 +} // namespace
    1.89 +
    1.90 +#endif

mercurial