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 [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 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // no-format |
81 enum YUVColorSpace { | 82 enum YUVColorSpace { |
82 REC_601, // SDTV standard with restricted "studio swing" color range. | 83 REC_601, // SDTV standard with restricted "studio swing" color range. |
83 REC_709, // HDTV standard with restricted "studio swing" color range. | 84 REC_709, // HDTV standard with restricted "studio swing" color range. |
84 JPEG, // Full color range [0, 255] JPEG color space. | 85 JPEG, // Full color range [0, 255] JPEG color space. |
85 }; | 86 }; |
| 87 // end-no-format |
86 | 88 |
87 struct YUVVideoQuadState { | 89 struct YUVVideoQuadState { |
88 RectF tex_coord_rect; | 90 RectF tex_coord_rect; |
89 uint32 y_plane_resource_id; | 91 uint32 y_plane_resource_id; |
90 uint32 u_plane_resource_id; | 92 uint32 u_plane_resource_id; |
91 uint32 v_plane_resource_id; | 93 uint32 v_plane_resource_id; |
92 uint32 a_plane_resource_id; | 94 uint32 a_plane_resource_id; |
93 YUVColorSpace color_space; | 95 YUVColorSpace color_space; |
94 }; | 96 }; |
95 | 97 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 RenderPassQuadState? render_pass_quad_state; | 139 RenderPassQuadState? render_pass_quad_state; |
138 SolidColorQuadState? solid_color_quad_state; | 140 SolidColorQuadState? solid_color_quad_state; |
139 SurfaceQuadState? surface_quad_state; | 141 SurfaceQuadState? surface_quad_state; |
140 TextureQuadState? texture_quad_state; | 142 TextureQuadState? texture_quad_state; |
141 TileQuadState? tile_quad_state; | 143 TileQuadState? tile_quad_state; |
142 StreamVideoQuadState? stream_video_quad_state; | 144 StreamVideoQuadState? stream_video_quad_state; |
143 YUVVideoQuadState? yuv_video_quad_state; | 145 YUVVideoQuadState? yuv_video_quad_state; |
144 }; | 146 }; |
145 | 147 |
146 enum SkXfermode { | 148 enum SkXfermode { |
| 149 // no-format |
147 kClear_Mode = 0, //!< [0, 0] | 150 kClear_Mode = 0, //!< [0, 0] |
148 kSrc_Mode, //!< [Sa, Sc] | 151 kSrc_Mode, //!< [Sa, Sc] |
149 kDst_Mode, //!< [Da, Dc] | 152 kDst_Mode, //!< [Da, Dc] |
150 kSrcOver_Mode, //!< [Sa + Da - Sa*Da, Rc = Sc + (1 - Sa)*Dc] | 153 kSrcOver_Mode, //!< [Sa + Da - Sa*Da, Rc = Sc + (1 - Sa)*Dc] |
151 kDstOver_Mode, //!< [Sa + Da - Sa*Da, Rc = Dc + (1 - Da)*Sc] | 154 kDstOver_Mode, //!< [Sa + Da - Sa*Da, Rc = Dc + (1 - Da)*Sc] |
152 kSrcIn_Mode, //!< [Sa * Da, Sc * Da] | 155 kSrcIn_Mode, //!< [Sa * Da, Sc * Da] |
153 kDstIn_Mode, //!< [Sa * Da, Sa * Dc] | 156 kDstIn_Mode, //!< [Sa * Da, Sa * Dc] |
154 kSrcOut_Mode, //!< [Sa * (1 - Da), Sc * (1 - Da)] | 157 kSrcOut_Mode, //!< [Sa * (1 - Da), Sc * (1 - Da)] |
155 kDstOut_Mode, //!< [Da * (1 - Sa), Dc * (1 - Sa)] | 158 kDstOut_Mode, //!< [Da * (1 - Sa), Dc * (1 - Sa)] |
156 kSrcATop_Mode, //!< [Da, Sc * Da + (1 - Sa) * Dc] | 159 kSrcATop_Mode, //!< [Da, Sc * Da + (1 - Sa) * Dc] |
157 kDstATop_Mode, //!< [Sa, Sa * Dc + Sc * (1 - Da)] | 160 kDstATop_Mode, //!< [Sa, Sa * Dc + Sc * (1 - Da)] |
158 kXor_Mode, //!< [Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + (1 - Sa) * Dc] | 161 kXor_Mode, //!< [Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + (1 - Sa) * Dc] |
159 kPlus_Mode, //!< [Sa + Da, Sc + Dc] | 162 kPlus_Mode, //!< [Sa + Da, Sc + Dc] |
160 kModulate_Mode, // multiplies all components (= alpha and color) | 163 kModulate_Mode, // multiplies all components (= alpha and color) |
| 164 // end-no-format |
161 | 165 |
162 // Following blend modes are defined in the CSS Compositing standard: | 166 // Following blend modes are defined in the CSS Compositing standard: |
163 // https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending | 167 // https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending |
164 kScreen_Mode, | 168 kScreen_Mode, |
165 kLastCoeffMode = kScreen_Mode, | 169 kLastCoeffMode = kScreen_Mode, |
166 | 170 |
167 kOverlay_Mode, | 171 kOverlay_Mode, |
168 kDarken_Mode, | 172 kDarken_Mode, |
169 kLighten_Mode, | 173 kLighten_Mode, |
170 kColorDodge_Mode, | 174 kColorDodge_Mode, |
171 kColorBurn_Mode, | 175 kColorBurn_Mode, |
172 kHardLight_Mode, | 176 kHardLight_Mode, |
173 kSoftLight_Mode, | 177 kSoftLight_Mode, |
174 kDifference_Mode, | 178 kDifference_Mode, |
175 kExclusion_Mode, | 179 kExclusion_Mode, |
176 kMultiply_Mode, | 180 kMultiply_Mode, |
177 kLastSeparableMode = kMultiply_Mode, | 181 kLastSeparableMode = kMultiply_Mode, |
178 | 182 |
179 kHue_Mode, | 183 kHue_Mode, |
180 kSaturation_Mode, | 184 kSaturation_Mode, |
181 kColor_Mode, | 185 kColor_Mode, |
182 kLuminosity_Mode, | 186 kLuminosity_Mode, |
183 kLastMode = kLuminosity_Mode | 187 kLastMode = kLuminosity_Mode, |
184 }; | 188 }; |
185 | 189 |
186 struct SharedQuadState { | 190 struct SharedQuadState { |
187 // Transforms from quad's original content space to its target content space. | 191 // Transforms from quad's original content space to its target content space. |
188 Transform content_to_target_transform; | 192 Transform content_to_target_transform; |
189 | 193 |
190 // This size lives in the content space for the quad's originating layer. | 194 // This size lives in the content space for the quad's originating layer. |
191 Size content_bounds; | 195 Size content_bounds; |
192 | 196 |
193 // This rect lives in the content space for the quad's originating layer. | 197 // This rect lives in the content space for the quad's originating layer. |
(...skipping 10 matching lines...) Expand all Loading... |
204 | 208 |
205 struct Pass { | 209 struct Pass { |
206 int32 id; | 210 int32 id; |
207 Rect output_rect; | 211 Rect output_rect; |
208 Rect damage_rect; | 212 Rect damage_rect; |
209 Transform transform_to_root_target; | 213 Transform transform_to_root_target; |
210 bool has_transparent_background; | 214 bool has_transparent_background; |
211 array<Quad> quads; | 215 array<Quad> quads; |
212 array<SharedQuadState> shared_quad_states; | 216 array<SharedQuadState> shared_quad_states; |
213 }; | 217 }; |
OLD | NEW |