Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: mojo/services/surfaces/interfaces/quads.mojom

Issue 1741963002: Auto-formatted all .mojom files. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [DartPackage="mojo_services"] 5 [DartPackage="mojo_services"]
6 module mojo; 6 module mojo;
7 7
8 import "geometry/interfaces/geometry.mojom"; 8 import "geometry/interfaces/geometry.mojom";
9 import "surfaces/interfaces/surface_id.mojom"; 9 import "surfaces/interfaces/surface_id.mojom";
10 10
11 struct Color { 11 struct Color {
12 uint32 rgba; 12 uint32 rgba;
13 }; 13 };
14 14
15 // TODO(jamesr): Populate subtype fields. 15 // TODO(jamesr): Populate subtype fields.
16 struct CheckerboardQuadState {}; 16 struct CheckerboardQuadState{};
17 17
18 struct DebugBorderQuadState {}; 18 struct DebugBorderQuadState{};
19 19
20 struct IoSurfaceContentQuadState {}; 20 struct IoSurfaceContentQuadState{};
21 21
22 struct RenderPassId { 22 struct RenderPassId {
23 int32 layer_id; 23 int32 layer_id;
24 int32 index; 24 int32 index;
25 }; 25 };
26 26
27 struct RenderPassQuadState { 27 struct RenderPassQuadState {
28 RenderPassId render_pass_id; 28 RenderPassId render_pass_id;
29 29
30 // If nonzero, resource id of mask to use when drawing this pass. 30 // If nonzero, resource id of mask to use when drawing this pass.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 }; 69 };
70 70
71 struct TileQuadState { 71 struct TileQuadState {
72 RectF tex_coord_rect; 72 RectF tex_coord_rect;
73 Size texture_size; 73 Size texture_size;
74 bool swizzle_contents; 74 bool swizzle_contents;
75 uint32 resource_id; 75 uint32 resource_id;
76 bool nearest_neighbor; 76 bool nearest_neighbor;
77 }; 77 };
78 78
79 struct StreamVideoQuadState {}; 79 struct StreamVideoQuadState{};
80 80
81 enum YUVColorSpace { 81 enum YUVColorSpace {
82 REC_601, // SDTV standard with restricted "studio swing" color range. 82 REC_601, // SDTV standard with restricted "studio swing" color range.
83 REC_709, // HDTV standard with restricted "studio swing" color range. 83 REC_709, // HDTV standard with restricted "studio swing" color range.
84 JPEG, // Full color range [0, 255] JPEG color space. 84 JPEG, // Full color range [0, 255] JPEG color space.
85 }; 85 };
86 86
87 struct YUVVideoQuadState { 87 struct YUVVideoQuadState {
88 RectF tex_coord_rect; 88 RectF tex_coord_rect;
89 uint32 y_plane_resource_id; 89 uint32 y_plane_resource_id;
90 uint32 u_plane_resource_id; 90 uint32 u_plane_resource_id;
91 uint32 v_plane_resource_id; 91 uint32 v_plane_resource_id;
92 uint32 a_plane_resource_id; 92 uint32 a_plane_resource_id;
93 YUVColorSpace color_space; 93 YUVColorSpace color_space;
94 }; 94 };
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 RenderPassQuadState? render_pass_quad_state; 137 RenderPassQuadState? render_pass_quad_state;
138 SolidColorQuadState? solid_color_quad_state; 138 SolidColorQuadState? solid_color_quad_state;
139 SurfaceQuadState? surface_quad_state; 139 SurfaceQuadState? surface_quad_state;
140 TextureQuadState? texture_quad_state; 140 TextureQuadState? texture_quad_state;
141 TileQuadState? tile_quad_state; 141 TileQuadState? tile_quad_state;
142 StreamVideoQuadState? stream_video_quad_state; 142 StreamVideoQuadState? stream_video_quad_state;
143 YUVVideoQuadState? yuv_video_quad_state; 143 YUVVideoQuadState? yuv_video_quad_state;
144 }; 144 };
145 145
146 enum SkXfermode { 146 enum SkXfermode {
147 kClear_Mode = 0, //!< [0, 0] 147 kClear_Mode = 0, //!< [0, 0]
148 kSrc_Mode, //!< [Sa, Sc] 148 kSrc_Mode, //!< [Sa, Sc]
149 kDst_Mode, //!< [Da, Dc] 149 kDst_Mode, //!< [Da, Dc]
150 kSrcOver_Mode, //!< [Sa + Da - Sa*Da, Rc = Sc + (1 - Sa)*Dc] 150 kSrcOver_Mode, //!< [Sa + Da - Sa*Da, Rc = Sc + (1 - Sa)*Dc]
151 kDstOver_Mode, //!< [Sa + Da - Sa*Da, Rc = Dc + (1 - Da)*Sc] 151 kDstOver_Mode, //!< [Sa + Da - Sa*Da, Rc = Dc + (1 - Da)*Sc]
152 kSrcIn_Mode, //!< [Sa * Da, Sc * Da] 152 kSrcIn_Mode, //!< [Sa * Da, Sc * Da]
153 kDstIn_Mode, //!< [Sa * Da, Sa * Dc] 153 kDstIn_Mode, //!< [Sa * Da, Sa * Dc]
154 kSrcOut_Mode, //!< [Sa * (1 - Da), Sc * (1 - Da)] 154 kSrcOut_Mode, //!< [Sa * (1 - Da), Sc * (1 - Da)]
155 kDstOut_Mode, //!< [Da * (1 - Sa), Dc * (1 - Sa)] 155 kDstOut_Mode, //!< [Da * (1 - Sa), Dc * (1 - Sa)]
156 kSrcATop_Mode, //!< [Da, Sc * Da + (1 - Sa) * Dc] 156 kSrcATop_Mode, //!< [Da, Sc * Da + (1 - Sa) * Dc]
157 kDstATop_Mode, //!< [Sa, Sa * Dc + Sc * (1 - Da)] 157 kDstATop_Mode, //!< [Sa, Sa * Dc + Sc * (1 - Da)]
158 kXor_Mode, //!< [Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + (1 - Sa) * Dc] 158 kXor_Mode, //!< [Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + (1 - Sa) * Dc]
159 kPlus_Mode, //!< [Sa + Da, Sc + Dc] 159 kPlus_Mode, //!< [Sa + Da, Sc + Dc]
160 kModulate_Mode, // multiplies all components (= alpha and color) 160 kModulate_Mode, // multiplies all components (= alpha and color)
161 161
162 // Following blend modes are defined in the CSS Compositing standard: 162 // Following blend modes are defined in the CSS Compositing standard:
163 // https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending 163 // https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending
164 kScreen_Mode, 164 kScreen_Mode,
165 kLastCoeffMode = kScreen_Mode, 165 kLastCoeffMode = kScreen_Mode,
166 166
167 kOverlay_Mode, 167 kOverlay_Mode,
168 kDarken_Mode, 168 kDarken_Mode,
169 kLighten_Mode, 169 kLighten_Mode,
170 kColorDodge_Mode, 170 kColorDodge_Mode,
171 kColorBurn_Mode, 171 kColorBurn_Mode,
172 kHardLight_Mode, 172 kHardLight_Mode,
173 kSoftLight_Mode, 173 kSoftLight_Mode,
174 kDifference_Mode, 174 kDifference_Mode,
175 kExclusion_Mode, 175 kExclusion_Mode,
176 kMultiply_Mode, 176 kMultiply_Mode,
177 kLastSeparableMode = kMultiply_Mode, 177 kLastSeparableMode = kMultiply_Mode,
178 178
179 kHue_Mode, 179 kHue_Mode,
180 kSaturation_Mode, 180 kSaturation_Mode,
181 kColor_Mode, 181 kColor_Mode,
182 kLuminosity_Mode, 182 kLuminosity_Mode,
183 kLastMode = kLuminosity_Mode 183 kLastMode = kLuminosity_Mode,
184 }; 184 };
185 185
186 struct SharedQuadState { 186 struct SharedQuadState {
187 // Transforms from quad's original content space to its target content space. 187 // Transforms from quad's original content space to its target content space.
188 Transform content_to_target_transform; 188 Transform content_to_target_transform;
189 189
190 // This size lives in the content space for the quad's originating layer. 190 // This size lives in the content space for the quad's originating layer.
191 Size content_bounds; 191 Size content_bounds;
192 192
193 // This rect lives in the content space for the quad's originating layer. 193 // This rect lives in the content space for the quad's originating layer.
(...skipping 10 matching lines...) Expand all
204 204
205 struct Pass { 205 struct Pass {
206 int32 id; 206 int32 id;
207 Rect output_rect; 207 Rect output_rect;
208 Rect damage_rect; 208 Rect damage_rect;
209 Transform transform_to_root_target; 209 Transform transform_to_root_target;
210 bool has_transparent_background; 210 bool has_transparent_background;
211 array<Quad> quads; 211 array<Quad> quads;
212 array<SharedQuadState> shared_quad_states; 212 array<SharedQuadState> shared_quad_states;
213 }; 213 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698