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

Side by Side Diff: components/mus/public/interfaces/quads.mojom

Issue 1406153004: components/mus/public/interfaces View => Window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet another rebase Created 5 years, 2 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 module mojo; 5 module mus.mojom;
6 6
7 import "components/mus/public/interfaces/surface_id.mojom"; 7 import "components/mus/public/interfaces/surface_id.mojom";
8 import "ui/mojo/geometry/geometry.mojom"; 8 import "ui/mojo/geometry/geometry.mojom";
9 9
10 struct Color { 10 struct Color {
11 uint32 rgba; 11 uint32 rgba;
12 }; 12 };
13 13
14 struct CheckerboardQuadState { 14 struct CheckerboardQuadState {
15 // Checkerboard color. 15 // Checkerboard color.
(...skipping 18 matching lines...) Expand all
34 struct RenderPassId { 34 struct RenderPassId {
35 int32 layer_id; 35 int32 layer_id;
36 uint32 index; 36 uint32 index;
37 }; 37 };
38 38
39 struct RenderPassQuadState { 39 struct RenderPassQuadState {
40 RenderPassId render_pass_id; 40 RenderPassId render_pass_id;
41 41
42 // If nonzero, resource id of mask to use when drawing this pass. 42 // If nonzero, resource id of mask to use when drawing this pass.
43 uint32 mask_resource_id; 43 uint32 mask_resource_id;
44 PointF mask_uv_scale; 44 mojo.PointF mask_uv_scale;
45 Size mask_texture_size; 45 mojo.Size mask_texture_size;
46 46
47 // Post-processing filters, applied to the pixels in the render pass' texture. 47 // Post-processing filters, applied to the pixels in the render pass' texture.
48 // TODO(jamesr): Support 48 // TODO(jamesr): Support
49 // FilterOperations filters; 49 // FilterOperations filters;
50 50
51 // The scale from layer space of the root layer of the render pass to 51 // The scale from layer space of the root layer of the render pass to
52 // the render pass physical pixels. This scale is applied to the filter 52 // the render pass physical pixels. This scale is applied to the filter
53 // parameters for pixel-moving filters. This scale should include 53 // parameters for pixel-moving filters. This scale should include
54 // content-to-target-space scale, and device pixel ratio. 54 // content-to-target-space scale, and device pixel ratio.
55 PointF filters_scale; 55 mojo.PointF filters_scale;
56 56
57 // Post-processing filters, applied to the pixels showing through the 57 // Post-processing filters, applied to the pixels showing through the
58 // background of the render pass, from behind it. 58 // background of the render pass, from behind it.
59 // TODO(jamesr): Support 59 // TODO(jamesr): Support
60 // FilterOperations background_filters; 60 // FilterOperations background_filters;
61 }; 61 };
62 62
63 struct SolidColorQuadState { 63 struct SolidColorQuadState {
64 Color color; 64 Color color;
65 bool force_anti_aliasing_off; 65 bool force_anti_aliasing_off;
66 }; 66 };
67 67
68 struct SurfaceQuadState { 68 struct SurfaceQuadState {
69 SurfaceId surface; 69 mus.mojom.SurfaceId surface;
70 }; 70 };
71 71
72 struct TextureQuadState { 72 struct TextureQuadState {
73 uint32 resource_id; 73 uint32 resource_id;
74 bool premultiplied_alpha; 74 bool premultiplied_alpha;
75 PointF uv_top_left; 75 mojo.PointF uv_top_left;
76 PointF uv_bottom_right; 76 mojo.PointF uv_bottom_right;
77 Color background_color; 77 Color background_color;
78 array<float, 4> vertex_opacity; 78 array<float, 4> vertex_opacity;
79 bool y_flipped; 79 bool y_flipped;
80 bool nearest_neighbor; 80 bool nearest_neighbor;
81 }; 81 };
82 82
83 struct TileQuadState { 83 struct TileQuadState {
84 RectF tex_coord_rect; 84 mojo.RectF tex_coord_rect;
85 Size texture_size; 85 mojo.Size texture_size;
86 bool swizzle_contents; 86 bool swizzle_contents;
87 uint32 resource_id; 87 uint32 resource_id;
88 bool nearest_neighbor; 88 bool nearest_neighbor;
89 }; 89 };
90 90
91 struct StreamVideoQuadState {}; 91 struct StreamVideoQuadState {};
92 92
93 enum YUVColorSpace { 93 enum YUVColorSpace {
94 REC_601, // SDTV standard with restricted "studio swing" color range. 94 REC_601, // SDTV standard with restricted "studio swing" color range.
95 REC_709, // HDTV standard with restricted "studio swing" color range. 95 REC_709, // HDTV standard with restricted "studio swing" color range.
96 JPEG, // Full color range [0, 255] JPEG color space. 96 JPEG, // Full color range [0, 255] JPEG color space.
97 }; 97 };
98 98
99 struct YUVVideoQuadState { 99 struct YUVVideoQuadState {
100 RectF ya_tex_coord_rect; 100 mojo.RectF ya_tex_coord_rect;
101 RectF uv_tex_coord_rect; 101 mojo.RectF uv_tex_coord_rect;
102 Size ya_tex_size; 102 mojo.Size ya_tex_size;
103 Size uv_tex_size; 103 mojo.Size uv_tex_size;
104 uint32 y_plane_resource_id; 104 uint32 y_plane_resource_id;
105 uint32 u_plane_resource_id; 105 uint32 u_plane_resource_id;
106 uint32 v_plane_resource_id; 106 uint32 v_plane_resource_id;
107 uint32 a_plane_resource_id; 107 uint32 a_plane_resource_id;
108 YUVColorSpace color_space; 108 YUVColorSpace color_space;
109 }; 109 };
110 110
111 enum Material { 111 enum Material {
112 DEBUG_BORDER = 1, 112 DEBUG_BORDER = 1,
113 IO_SURFACE_CONTENT, 113 IO_SURFACE_CONTENT,
114 PICTURE_CONTENT, 114 PICTURE_CONTENT,
115 RENDER_PASS, 115 RENDER_PASS,
116 SOLID_COLOR, 116 SOLID_COLOR,
117 STREAM_VIDEO_CONTENT, 117 STREAM_VIDEO_CONTENT,
118 SURFACE_CONTENT, 118 SURFACE_CONTENT,
119 TEXTURE_CONTENT, 119 TEXTURE_CONTENT,
120 TILED_CONTENT, 120 TILED_CONTENT,
121 YUV_VIDEO_CONTENT, 121 YUV_VIDEO_CONTENT,
122 }; 122 };
123 123
124 struct Quad { 124 struct Quad {
125 Material material; 125 Material material;
126 126
127 // This rect, after applying the quad_transform(), gives the geometry that 127 // This rect, after applying the quad_transform(), gives the geometry that
128 // this quad should draw to. This rect lives in content space. 128 // this quad should draw to. This rect lives in content space.
129 Rect rect; 129 mojo.Rect rect;
130 130
131 // This specifies the region of the quad that is opaque. This rect lives in 131 // This specifies the region of the quad that is opaque. This rect lives in
132 // content space. 132 // content space.
133 Rect opaque_rect; 133 mojo.Rect opaque_rect;
134 134
135 // Allows changing the rect that gets drawn to make it smaller. This value 135 // Allows changing the rect that gets drawn to make it smaller. This value
136 // should be clipped to |rect|. This rect lives in content space. 136 // should be clipped to |rect|. This rect lives in content space.
137 Rect visible_rect; 137 mojo.Rect visible_rect;
138 138
139 // Allows changing the rect that gets drawn to make it smaller. This value 139 // Allows changing the rect that gets drawn to make it smaller. This value
140 // should be clipped to |rect|. This rect lives in content space. 140 // should be clipped to |rect|. This rect lives in content space.
141 bool needs_blending; 141 bool needs_blending;
142 142
143 // Index into the containing pass' shared quad state array which has state 143 // Index into the containing pass' shared quad state array which has state
144 // (transforms etc) shared by multiple quads. 144 // (transforms etc) shared by multiple quads.
145 uint32 shared_quad_state_index; 145 uint32 shared_quad_state_index;
146 146
147 // Only one of the following will be set, depending on the material. 147 // Only one of the following will be set, depending on the material.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 kLastSeparableMode = kMultiply_Mode, 191 kLastSeparableMode = kMultiply_Mode,
192 192
193 kHue_Mode, 193 kHue_Mode,
194 kSaturation_Mode, 194 kSaturation_Mode,
195 kColor_Mode, 195 kColor_Mode,
196 kLuminosity_Mode, 196 kLuminosity_Mode,
197 kLastMode = kLuminosity_Mode 197 kLastMode = kLuminosity_Mode
198 }; 198 };
199 199
200 struct SharedQuadState { 200 struct SharedQuadState {
201 // Transforms quad rects into the target content space. 201 // mojo.Transforms quad rects into the target content space.
202 Transform quad_to_target_transform; 202 mojo.Transform quad_to_target_transform;
203 203
204 // The size of the quads' originating layer in the space of the quad rects. 204 // The size of the quads' originating layer in the space of the quad rects.
205 Size quad_layer_bounds; 205 mojo.Size quad_layer_bounds;
206 206
207 // The size of the visible area in the quads' originating layer, in the space 207 // The size of the visible area in the quads' originating layer, in the space
208 // of the quad rects. 208 // of the quad rects.
209 Rect visible_quad_layer_rect; 209 mojo.Rect visible_quad_layer_rect;
210 210
211 // This rect lives in the target content space. 211 // This rect lives in the target content space.
212 Rect clip_rect; 212 mojo.Rect clip_rect;
213 213
214 bool is_clipped; 214 bool is_clipped;
215 float opacity; 215 float opacity;
216 SkXfermode blend_mode; 216 SkXfermode blend_mode;
217 int32 sorting_context_id; 217 int32 sorting_context_id;
218 }; 218 };
219 219
220 struct Pass { 220 struct Pass {
221 RenderPassId id; 221 RenderPassId id;
222 Rect output_rect; 222 mojo.Rect output_rect;
223 Rect damage_rect; 223 mojo.Rect damage_rect;
224 Transform transform_to_root_target; 224 mojo.Transform transform_to_root_target;
225 bool has_transparent_background; 225 bool has_transparent_background;
226 array<Quad> quads; 226 array<Quad> quads;
227 array<SharedQuadState> shared_quad_states; 227 array<SharedQuadState> shared_quad_states;
228 }; 228 };
OLDNEW
« no previous file with comments | « components/mus/public/interfaces/mus_constants.mojom ('k') | components/mus/public/interfaces/surface_id.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698