gfx/layers/ipc/LayersSurfaces.ipdlh

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/layers/ipc/LayersSurfaces.ipdlh	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,106 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +include protocol PGrallocBuffer;
     1.9 +
    1.10 +
    1.11 +using struct gfxPoint from "gfxPoint.h";
    1.12 +using struct nsIntRect from "nsRect.h";
    1.13 +using nsIntRegion from "nsRegion.h";
    1.14 +using struct nsIntSize from "nsSize.h";
    1.15 +using struct mozilla::layers::MagicGrallocBufferHandle from "gfxipc/ShadowLayerUtils.h";
    1.16 +using struct mozilla::layers::SurfaceDescriptorX11 from "gfxipc/ShadowLayerUtils.h";
    1.17 +using struct mozilla::null_t from "ipc/IPCMessageUtils.h";
    1.18 +using mozilla::WindowsHandle from "ipc/IPCMessageUtils.h";
    1.19 +using mozilla::gl::SharedTextureHandle from "GLContextTypes.h";
    1.20 +using mozilla::gl::SharedTextureShareType from "GLContextTypes.h";
    1.21 +using mozilla::gfx::SurfaceStreamHandle from "SurfaceTypes.h";
    1.22 +using mozilla::gfx::SurfaceFormat from "mozilla/gfx/Types.h";
    1.23 +using mozilla::gfx::IntSize from "mozilla/gfx/Point.h";
    1.24 +using gfxImageFormat from "gfxTypes.h";
    1.25 +
    1.26 +namespace mozilla {
    1.27 +namespace layers {
    1.28 +
    1.29 +union MaybeMagicGrallocBufferHandle {
    1.30 +  MagicGrallocBufferHandle;
    1.31 +  null_t;
    1.32 +};
    1.33 +
    1.34 +struct SurfaceDescriptorD3D9 {
    1.35 +  // IDirect3DTexture9*
    1.36 +  uintptr_t texture;
    1.37 +};
    1.38 +
    1.39 +struct SurfaceDescriptorDIB {
    1.40 +  // gfxWindowsSurface*
    1.41 +  uintptr_t surface;
    1.42 +};
    1.43 +
    1.44 +struct SurfaceDescriptorD3D10 {
    1.45 +  WindowsHandle handle;
    1.46 +  SurfaceFormat format;
    1.47 +  IntSize size;
    1.48 +};
    1.49 +
    1.50 +struct SurfaceDescriptorMacIOSurface {
    1.51 +  uint32_t surface;
    1.52 +  double scaleFactor;
    1.53 +  bool hasAlpha;
    1.54 +};
    1.55 +
    1.56 +struct SharedTextureDescriptor {
    1.57 +  SharedTextureShareType shareType;
    1.58 +  SharedTextureHandle handle;
    1.59 +  IntSize size;
    1.60 +  bool inverted;
    1.61 +};
    1.62 +
    1.63 +struct NewSurfaceDescriptorGralloc {
    1.64 +  PGrallocBuffer buffer;
    1.65 +  /**
    1.66 +   * android::GraphicBuffer has a size information. But there are cases
    1.67 +   * that GraphicBuffer's size and actual video's size are different.
    1.68 +   * Extra size member is necessary. See Bug 850566.
    1.69 +   */
    1.70 +  IntSize size;
    1.71 +};
    1.72 +
    1.73 +struct SurfaceStreamDescriptor {
    1.74 +  SurfaceStreamHandle handle;
    1.75 +  bool yflip;
    1.76 +};
    1.77 +
    1.78 +/**
    1.79 + * Used for shmem-backed YCbCr and (flavors of) RGBA textures
    1.80 + */
    1.81 +struct SurfaceDescriptorShmem {
    1.82 +  Shmem data;
    1.83 +  SurfaceFormat format;
    1.84 +};
    1.85 +
    1.86 +/**
    1.87 + * Used for "raw memory"-backed YCbCr and (flavors of) RGBA textures
    1.88 + */
    1.89 + struct SurfaceDescriptorMemory {
    1.90 +  uintptr_t data;
    1.91 +  SurfaceFormat format;
    1.92 +};
    1.93 +
    1.94 +union SurfaceDescriptor {
    1.95 +  SurfaceDescriptorShmem;
    1.96 +  SurfaceDescriptorMemory;
    1.97 +  SurfaceDescriptorD3D9;
    1.98 +  SurfaceDescriptorDIB;
    1.99 +  SurfaceDescriptorD3D10;
   1.100 +  SurfaceDescriptorX11;
   1.101 +  SharedTextureDescriptor;
   1.102 +  SurfaceStreamDescriptor;
   1.103 +  SurfaceDescriptorMacIOSurface;
   1.104 +  NewSurfaceDescriptorGralloc;
   1.105 +  null_t;
   1.106 +};
   1.107 +
   1.108 +} // namespace
   1.109 +} // namespace

mercurial