summaryrefslogtreecommitdiffstats
path: root/gfx/layers/ipc/WebRenderMessages.ipdlh
blob: eb5633a5060634985fba69620191b0bc9debb670 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 * vim: sw=2 ts=8 et :
 */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

include "mozilla/layers/LayersMessageUtils.h";
include "mozilla/layers/WebRenderMessageUtils.h";

include LayersSurfaces;
include LayersMessages;
include protocol PTexture;

using mozilla::layers::CompositableHandle from "mozilla/layers/LayersTypes.h";
using mozilla::layers::CompositableHandleOwner from "mozilla/layers/LayersTypes.h";
using mozilla::wr::LayoutSize from "mozilla/webrender/webrender_ffi.h";
using mozilla::wr::ImageDescriptor from "mozilla/webrender/webrender_ffi.h";
using mozilla::wr::ImageRendering from "mozilla/webrender/webrender_ffi.h";
using mozilla::wr::MixBlendMode from "mozilla/webrender/webrender_ffi.h";
using mozilla::wr::ExternalImageId from "mozilla/webrender/WebRenderTypes.h";
using mozilla::wr::MaybeFontInstanceOptions from "mozilla/webrender/WebRenderTypes.h";
using mozilla::wr::MaybeFontInstancePlatformOptions from "mozilla/webrender/WebRenderTypes.h";
using mozilla::wr::FontInstanceKey from "mozilla/webrender/WebRenderTypes.h";
using mozilla::wr::FontKey from "mozilla/webrender/WebRenderTypes.h";
using mozilla::wr::ImageKey from "mozilla/webrender/WebRenderTypes.h";
using mozilla::wr::BlobImageKey from "mozilla/webrender/WebRenderTypes.h";
using mozilla::wr::PipelineId from "mozilla/webrender/WebRenderTypes.h";
using mozilla::gfx::MaybeIntSize from "mozilla/gfx/Point.h";
using mozilla::LayoutDeviceRect from "Units.h";
using mozilla::LayoutDeviceSize from "Units.h";
using mozilla::ImageIntRect from "Units.h";
using mozilla::gfx::Rect from "mozilla/gfx/Rect.h";
using mozilla::VideoInfo::Rotation from "MediaInfo.h";
using mozilla::gfx::Matrix4x4 from "mozilla/gfx/Matrix.h";
using struct mozilla::void_t from "mozilla/ipc/IPCCore.h";

namespace mozilla {
namespace layers {

struct RefCountedShmem {
  Shmem buffer;
};

struct OpAddSharedExternalImage {
  ExternalImageId externalImageId;
  ImageKey key;
};

struct OpPushExternalImageForTexture {
  ExternalImageId externalImageId;
  ImageKey key;
  PTexture texture;
  bool isUpdate;
};

struct OpAddCompositorAnimations {
  CompositorAnimations data;
};

struct OpAddPipelineIdForCompositable {
  PipelineId pipelineId;
  CompositableHandle handle;
  CompositableHandleOwner owner;
};

struct OpRemovePipelineIdForCompositable {
  PipelineId pipelineId;
};

struct OpReleaseTextureOfImage {
  ImageKey key;
};

struct OpUpdateAsyncImagePipeline {
  PipelineId pipelineId;
  LayoutDeviceRect scBounds;
  Rotation rotation;
  ImageRendering filter;
  MixBlendMode mixBlendMode;
};

struct OpUpdatedAsyncImagePipeline {
  PipelineId pipelineId;
};

union WebRenderParentCommand {
  OpAddPipelineIdForCompositable;
  OpRemovePipelineIdForCompositable;
  OpReleaseTextureOfImage;
  OpUpdateAsyncImagePipeline;
  OpUpdatedAsyncImagePipeline;
  CompositableOperation;
  OpAddCompositorAnimations;
};

struct OffsetRange {
  uint32_t source;
  uint32_t start;
  uint32_t length;
};

struct OpAddImage {
  ImageDescriptor descriptor;
  OffsetRange bytes;
  uint16_t tiling;
  ImageKey key;
};

struct OpAddBlobImage {
  ImageDescriptor descriptor;
  OffsetRange bytes;
  ImageIntRect visibleRect;
  uint16_t tiling;
  BlobImageKey key;
};

struct OpUpdateImage {
  ImageDescriptor descriptor;
  OffsetRange bytes;
  ImageKey key;
};

struct OpUpdateBlobImage {
  ImageDescriptor descriptor;
  OffsetRange bytes;
  BlobImageKey key;
  ImageIntRect visibleRect;
  ImageIntRect dirtyRect;
};

struct OpSetBlobImageVisibleArea {
  ImageIntRect area;
  BlobImageKey key;
};

struct OpUpdateSharedExternalImage {
  ExternalImageId externalImageId;
  ImageKey key;
  ImageIntRect dirtyRect;
};

struct OpDeleteImage {
  ImageKey key;
};

struct OpDeleteBlobImage {
  BlobImageKey key;
};

struct OpAddRawFont {
  OffsetRange bytes;
  uint32_t fontIndex;
  FontKey key;
};

struct OpAddFontDescriptor {
  OffsetRange bytes;
  uint32_t fontIndex;
  FontKey key;
};

struct OpDeleteFont {
  FontKey key;
};

struct OpAddFontInstance {
  MaybeFontInstanceOptions options;
  MaybeFontInstancePlatformOptions platformOptions;
  OffsetRange variations;
  FontInstanceKey instanceKey;
  FontKey fontKey;
  float glyphSize;
};

struct OpDeleteFontInstance {
  FontInstanceKey key;
};

union OpUpdateResource {
  OpAddImage;
  OpAddBlobImage;
  OpUpdateImage;
  OpUpdateBlobImage;
  OpSetBlobImageVisibleArea;
  OpDeleteImage;
  OpDeleteBlobImage;
  OpAddRawFont;
  OpAddFontDescriptor;
  OpDeleteFont;
  OpAddFontInstance;
  OpDeleteFontInstance;
  OpAddSharedExternalImage;
  OpPushExternalImageForTexture;
  OpUpdateSharedExternalImage;
};

} // namespace
} // namespace