OLD | NEW |
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 module mus.mojom; | 5 module mus.mojom; |
6 | 6 |
7 import "cc/ipc/render_pass_id.mojom"; | 7 import "cc/ipc/render_pass_id.mojom"; |
| 8 import "cc/ipc/shared_quad_state.mojom"; |
8 import "cc/ipc/surface_id.mojom"; | 9 import "cc/ipc/surface_id.mojom"; |
9 import "ui/gfx/geometry/mojo/geometry.mojom"; | 10 import "ui/gfx/geometry/mojo/geometry.mojom"; |
10 import "ui/gfx/mojo/transform.mojom"; | 11 import "ui/gfx/mojo/transform.mojom"; |
11 | 12 |
12 struct Color { | 13 struct Color { |
13 uint32 rgba; | 14 uint32 rgba; |
14 }; | 15 }; |
15 | 16 |
16 struct CheckerboardQuadState { | 17 struct CheckerboardQuadState { |
17 // Checkerboard color. | 18 // Checkerboard color. |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 IoSurfaceContentQuadState? io_surface_quad_state; | 150 IoSurfaceContentQuadState? io_surface_quad_state; |
150 RenderPassQuadState? render_pass_quad_state; | 151 RenderPassQuadState? render_pass_quad_state; |
151 SolidColorQuadState? solid_color_quad_state; | 152 SolidColorQuadState? solid_color_quad_state; |
152 SurfaceQuadState? surface_quad_state; | 153 SurfaceQuadState? surface_quad_state; |
153 TextureQuadState? texture_quad_state; | 154 TextureQuadState? texture_quad_state; |
154 TileQuadState? tile_quad_state; | 155 TileQuadState? tile_quad_state; |
155 StreamVideoQuadState? stream_video_quad_state; | 156 StreamVideoQuadState? stream_video_quad_state; |
156 YUVVideoQuadState? yuv_video_quad_state; | 157 YUVVideoQuadState? yuv_video_quad_state; |
157 }; | 158 }; |
158 | 159 |
159 enum SkXfermode { | |
160 kClear_Mode = 0, //!< [0, 0] | |
161 kSrc_Mode, //!< [Sa, Sc] | |
162 kDst_Mode, //!< [Da, Dc] | |
163 kSrcOver_Mode, //!< [Sa + Da - Sa*Da, Rc = Sc + (1 - Sa)*Dc] | |
164 kDstOver_Mode, //!< [Sa + Da - Sa*Da, Rc = Dc + (1 - Da)*Sc] | |
165 kSrcIn_Mode, //!< [Sa * Da, Sc * Da] | |
166 kDstIn_Mode, //!< [Sa * Da, Sa * Dc] | |
167 kSrcOut_Mode, //!< [Sa * (1 - Da), Sc * (1 - Da)] | |
168 kDstOut_Mode, //!< [Da * (1 - Sa), Dc * (1 - Sa)] | |
169 kSrcATop_Mode, //!< [Da, Sc * Da + (1 - Sa) * Dc] | |
170 kDstATop_Mode, //!< [Sa, Sa * Dc + Sc * (1 - Da)] | |
171 kXor_Mode, //!< [Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + (1 - Sa) * Dc] | |
172 kPlus_Mode, //!< [Sa + Da, Sc + Dc] | |
173 kModulate_Mode, // multiplies all components (= alpha and color) | |
174 | |
175 // Following blend modes are defined in the CSS Compositing standard: | |
176 // https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending | |
177 kScreen_Mode, | |
178 kLastCoeffMode = kScreen_Mode, | |
179 | |
180 kOverlay_Mode, | |
181 kDarken_Mode, | |
182 kLighten_Mode, | |
183 kColorDodge_Mode, | |
184 kColorBurn_Mode, | |
185 kHardLight_Mode, | |
186 kSoftLight_Mode, | |
187 kDifference_Mode, | |
188 kExclusion_Mode, | |
189 kMultiply_Mode, | |
190 kLastSeparableMode = kMultiply_Mode, | |
191 | |
192 kHue_Mode, | |
193 kSaturation_Mode, | |
194 kColor_Mode, | |
195 kLuminosity_Mode, | |
196 kLastMode = kLuminosity_Mode | |
197 }; | |
198 | |
199 struct SharedQuadState { | |
200 // mojo.Transforms quad rects into the target content space. | |
201 gfx.mojom.Transform quad_to_target_transform; | |
202 | |
203 // The size of the quads' originating layer in the space of the quad rects. | |
204 gfx.mojom.Size quad_layer_bounds; | |
205 | |
206 // The size of the visible area in the quads' originating layer, in the space | |
207 // of the quad rects. | |
208 gfx.mojom.Rect visible_quad_layer_rect; | |
209 | |
210 // This rect lives in the target content space. | |
211 gfx.mojom.Rect clip_rect; | |
212 | |
213 bool is_clipped; | |
214 float opacity; | |
215 SkXfermode blend_mode; | |
216 int32 sorting_context_id; | |
217 }; | |
218 | |
219 struct Pass { | 160 struct Pass { |
220 cc.mojom.RenderPassId id; | 161 cc.mojom.RenderPassId id; |
221 gfx.mojom.Rect output_rect; | 162 gfx.mojom.Rect output_rect; |
222 gfx.mojom.Rect damage_rect; | 163 gfx.mojom.Rect damage_rect; |
223 gfx.mojom.Transform transform_to_root_target; | 164 gfx.mojom.Transform transform_to_root_target; |
224 bool has_transparent_background; | 165 bool has_transparent_background; |
225 array<Quad> quads; | 166 array<Quad> quads; |
226 array<SharedQuadState> shared_quad_states; | 167 array<cc.mojom.SharedQuadState> shared_quad_states; |
227 }; | 168 }; |
OLD | NEW |