gfx/layers/ipc/LayersSurfaces.ipdlh

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 include protocol PGrallocBuffer;
michael@0 6
michael@0 7
michael@0 8 using struct gfxPoint from "gfxPoint.h";
michael@0 9 using struct nsIntRect from "nsRect.h";
michael@0 10 using nsIntRegion from "nsRegion.h";
michael@0 11 using struct nsIntSize from "nsSize.h";
michael@0 12 using struct mozilla::layers::MagicGrallocBufferHandle from "gfxipc/ShadowLayerUtils.h";
michael@0 13 using struct mozilla::layers::SurfaceDescriptorX11 from "gfxipc/ShadowLayerUtils.h";
michael@0 14 using struct mozilla::null_t from "ipc/IPCMessageUtils.h";
michael@0 15 using mozilla::WindowsHandle from "ipc/IPCMessageUtils.h";
michael@0 16 using mozilla::gl::SharedTextureHandle from "GLContextTypes.h";
michael@0 17 using mozilla::gl::SharedTextureShareType from "GLContextTypes.h";
michael@0 18 using mozilla::gfx::SurfaceStreamHandle from "SurfaceTypes.h";
michael@0 19 using mozilla::gfx::SurfaceFormat from "mozilla/gfx/Types.h";
michael@0 20 using mozilla::gfx::IntSize from "mozilla/gfx/Point.h";
michael@0 21 using gfxImageFormat from "gfxTypes.h";
michael@0 22
michael@0 23 namespace mozilla {
michael@0 24 namespace layers {
michael@0 25
michael@0 26 union MaybeMagicGrallocBufferHandle {
michael@0 27 MagicGrallocBufferHandle;
michael@0 28 null_t;
michael@0 29 };
michael@0 30
michael@0 31 struct SurfaceDescriptorD3D9 {
michael@0 32 // IDirect3DTexture9*
michael@0 33 uintptr_t texture;
michael@0 34 };
michael@0 35
michael@0 36 struct SurfaceDescriptorDIB {
michael@0 37 // gfxWindowsSurface*
michael@0 38 uintptr_t surface;
michael@0 39 };
michael@0 40
michael@0 41 struct SurfaceDescriptorD3D10 {
michael@0 42 WindowsHandle handle;
michael@0 43 SurfaceFormat format;
michael@0 44 IntSize size;
michael@0 45 };
michael@0 46
michael@0 47 struct SurfaceDescriptorMacIOSurface {
michael@0 48 uint32_t surface;
michael@0 49 double scaleFactor;
michael@0 50 bool hasAlpha;
michael@0 51 };
michael@0 52
michael@0 53 struct SharedTextureDescriptor {
michael@0 54 SharedTextureShareType shareType;
michael@0 55 SharedTextureHandle handle;
michael@0 56 IntSize size;
michael@0 57 bool inverted;
michael@0 58 };
michael@0 59
michael@0 60 struct NewSurfaceDescriptorGralloc {
michael@0 61 PGrallocBuffer buffer;
michael@0 62 /**
michael@0 63 * android::GraphicBuffer has a size information. But there are cases
michael@0 64 * that GraphicBuffer's size and actual video's size are different.
michael@0 65 * Extra size member is necessary. See Bug 850566.
michael@0 66 */
michael@0 67 IntSize size;
michael@0 68 };
michael@0 69
michael@0 70 struct SurfaceStreamDescriptor {
michael@0 71 SurfaceStreamHandle handle;
michael@0 72 bool yflip;
michael@0 73 };
michael@0 74
michael@0 75 /**
michael@0 76 * Used for shmem-backed YCbCr and (flavors of) RGBA textures
michael@0 77 */
michael@0 78 struct SurfaceDescriptorShmem {
michael@0 79 Shmem data;
michael@0 80 SurfaceFormat format;
michael@0 81 };
michael@0 82
michael@0 83 /**
michael@0 84 * Used for "raw memory"-backed YCbCr and (flavors of) RGBA textures
michael@0 85 */
michael@0 86 struct SurfaceDescriptorMemory {
michael@0 87 uintptr_t data;
michael@0 88 SurfaceFormat format;
michael@0 89 };
michael@0 90
michael@0 91 union SurfaceDescriptor {
michael@0 92 SurfaceDescriptorShmem;
michael@0 93 SurfaceDescriptorMemory;
michael@0 94 SurfaceDescriptorD3D9;
michael@0 95 SurfaceDescriptorDIB;
michael@0 96 SurfaceDescriptorD3D10;
michael@0 97 SurfaceDescriptorX11;
michael@0 98 SharedTextureDescriptor;
michael@0 99 SurfaceStreamDescriptor;
michael@0 100 SurfaceDescriptorMacIOSurface;
michael@0 101 NewSurfaceDescriptorGralloc;
michael@0 102 null_t;
michael@0 103 };
michael@0 104
michael@0 105 } // namespace
michael@0 106 } // namespace

mercurial