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

Side by Side Diff: cc/ipc/quads.mojom

Issue 2064833002: Implement DrawQuad StructTraits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix move constructor Created 4 years, 6 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
« no previous file with comments | « cc/ipc/filter_operation_struct_traits.h ('k') | cc/ipc/quads.typemap » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cc.mojom; 5 module cc.mojom;
6 6
7 import "cc/ipc/filter_operations.mojom"; 7 import "cc/ipc/filter_operations.mojom";
8 import "cc/ipc/render_pass_id.mojom"; 8 import "cc/ipc/render_pass_id.mojom";
9 import "cc/ipc/shared_quad_state.mojom"; 9 import "cc/ipc/shared_quad_state.mojom";
10 import "cc/ipc/surface_id.mojom"; 10 import "cc/ipc/surface_id.mojom";
11 import "ui/gfx/geometry/mojo/geometry.mojom"; 11 import "ui/gfx/geometry/mojo/geometry.mojom";
12 import "ui/gfx/mojo/transform.mojom"; 12 import "ui/gfx/mojo/transform.mojom";
13 13
14 struct Color {
15 uint32 rgba;
16 };
17
18 struct DebugBorderQuadState { 14 struct DebugBorderQuadState {
19 // Debug border color. 15 // Debug border color.
20 Color color; 16 uint32 color;
21 17
22 // Debug border width. 18 // Debug border width.
23 int32 width; 19 int32 width;
24 }; 20 };
25 21
26 // TODO(jamesr): Populate subtype fields.
27 struct IoSurfaceContentQuadState {};
28
29 struct RenderPassQuadState { 22 struct RenderPassQuadState {
30 cc.mojom.RenderPassId render_pass_id; 23 cc.mojom.RenderPassId render_pass_id;
31 24
32 // If nonzero, resource id of mask to use when drawing this pass. 25 // If nonzero, resource id of mask to use when drawing this pass.
33 uint32 mask_resource_id; 26 uint32 mask_resource_id;
34 gfx.mojom.PointF mask_uv_scale; 27 gfx.mojom.Vector2dF mask_uv_scale;
35 gfx.mojom.Size mask_texture_size; 28 gfx.mojom.Size mask_texture_size;
36 29
37 // Post-processing filters, applied to the pixels in the render pass' texture. 30 // Post-processing filters, applied to the pixels in the render pass' texture.
38 cc.mojom.FilterOperations filters; 31 cc.mojom.FilterOperations filters;
39 32
40 // The scale from layer space of the root layer of the render pass to 33 // The scale from layer space of the root layer of the render pass to
41 // the render pass physical pixels. This scale is applied to the filter 34 // the render pass physical pixels. This scale is applied to the filter
42 // parameters for pixel-moving filters. This scale should include 35 // parameters for pixel-moving filters. This scale should include
43 // content-to-target-space scale, and device pixel ratio. 36 // content-to-target-space scale, and device pixel ratio.
44 gfx.mojom.PointF filters_scale; 37 gfx.mojom.Vector2dF filters_scale;
45 38
46 // Post-processing filters, applied to the pixels showing through the 39 // Post-processing filters, applied to the pixels showing through the
47 // background of the render pass, from behind it. 40 // background of the render pass, from behind it.
48 cc.mojom.FilterOperations background_filters; 41 cc.mojom.FilterOperations background_filters;
49 }; 42 };
50 43
51 struct SolidColorQuadState { 44 struct SolidColorQuadState {
52 Color color; 45 uint32 color;
53 bool force_anti_aliasing_off; 46 bool force_anti_aliasing_off;
54 }; 47 };
55 48
56 struct SurfaceQuadState { 49 struct SurfaceQuadState {
57 cc.mojom.SurfaceId surface; 50 cc.mojom.SurfaceId surface;
58 }; 51 };
59 52
60 struct TextureQuadState { 53 struct TextureQuadState {
61 uint32 resource_id; 54 uint32 resource_id;
62 bool premultiplied_alpha; 55 bool premultiplied_alpha;
63 gfx.mojom.PointF uv_top_left; 56 gfx.mojom.PointF uv_top_left;
64 gfx.mojom.PointF uv_bottom_right; 57 gfx.mojom.PointF uv_bottom_right;
65 Color background_color; 58 uint32 background_color;
66 array<float, 4> vertex_opacity; 59 array<float, 4> vertex_opacity;
67 bool y_flipped; 60 bool y_flipped;
68 bool nearest_neighbor; 61 bool nearest_neighbor;
69 bool secure_output_only; 62 bool secure_output_only;
70 }; 63 };
71 64
72 struct TileQuadState { 65 struct TileQuadState {
73 gfx.mojom.RectF tex_coord_rect; 66 gfx.mojom.RectF tex_coord_rect;
74 gfx.mojom.Size texture_size; 67 gfx.mojom.Size texture_size;
75 bool swizzle_contents; 68 bool swizzle_contents;
(...skipping 17 matching lines...) Expand all
93 uint32 y_plane_resource_id; 86 uint32 y_plane_resource_id;
94 uint32 u_plane_resource_id; 87 uint32 u_plane_resource_id;
95 uint32 v_plane_resource_id; 88 uint32 v_plane_resource_id;
96 uint32 a_plane_resource_id; 89 uint32 a_plane_resource_id;
97 YUVColorSpace color_space; 90 YUVColorSpace color_space;
98 float resource_offset; 91 float resource_offset;
99 float resource_multiplier; 92 float resource_multiplier;
100 }; 93 };
101 94
102 enum Material { 95 enum Material {
103 DEBUG_BORDER = 1, 96 INVALID,
97 DEBUG_BORDER,
104 PICTURE_CONTENT, 98 PICTURE_CONTENT,
105 RENDER_PASS, 99 RENDER_PASS,
106 SOLID_COLOR, 100 SOLID_COLOR,
107 STREAM_VIDEO_CONTENT, 101 STREAM_VIDEO_CONTENT,
108 SURFACE_CONTENT, 102 SURFACE_CONTENT,
109 TEXTURE_CONTENT, 103 TEXTURE_CONTENT,
110 TILED_CONTENT, 104 TILED_CONTENT,
111 YUV_VIDEO_CONTENT, 105 YUV_VIDEO_CONTENT,
112 }; 106 };
113 107
(...skipping 15 matching lines...) Expand all
129 // Allows changing the rect that gets drawn to make it smaller. This value 123 // Allows changing the rect that gets drawn to make it smaller. This value
130 // should be clipped to |rect|. This rect lives in content space. 124 // should be clipped to |rect|. This rect lives in content space.
131 bool needs_blending; 125 bool needs_blending;
132 126
133 // Index into the containing pass' shared quad state array which has state 127 // Index into the containing pass' shared quad state array which has state
134 // (transforms etc) shared by multiple quads. 128 // (transforms etc) shared by multiple quads.
135 uint32 shared_quad_state_index; 129 uint32 shared_quad_state_index;
136 130
137 // Only one of the following will be set, depending on the material. 131 // Only one of the following will be set, depending on the material.
138 DebugBorderQuadState? debug_border_quad_state; 132 DebugBorderQuadState? debug_border_quad_state;
139 IoSurfaceContentQuadState? io_surface_quad_state;
140 RenderPassQuadState? render_pass_quad_state; 133 RenderPassQuadState? render_pass_quad_state;
141 SolidColorQuadState? solid_color_quad_state; 134 SolidColorQuadState? solid_color_quad_state;
142 SurfaceQuadState? surface_quad_state; 135 SurfaceQuadState? surface_quad_state;
143 TextureQuadState? texture_quad_state; 136 TextureQuadState? texture_quad_state;
144 TileQuadState? tile_quad_state; 137 TileQuadState? tile_quad_state;
145 StreamVideoQuadState? stream_video_quad_state; 138 StreamVideoQuadState? stream_video_quad_state;
146 YUVVideoQuadState? yuv_video_quad_state; 139 YUVVideoQuadState? yuv_video_quad_state;
147 }; 140 };
148 141
142 struct QuadList {
143 array<Material> quad_types;
144 array<DrawQuad> quads;
145 };
146
149 struct RenderPass { 147 struct RenderPass {
150 cc.mojom.RenderPassId id; 148 cc.mojom.RenderPassId id;
151 gfx.mojom.Rect output_rect; 149 gfx.mojom.Rect output_rect;
152 gfx.mojom.Rect damage_rect; 150 gfx.mojom.Rect damage_rect;
153 gfx.mojom.Transform transform_to_root_target; 151 gfx.mojom.Transform transform_to_root_target;
154 bool has_transparent_background; 152 bool has_transparent_background;
155 array<DrawQuad> quads; 153 array<DrawQuad> quads;
156 array<cc.mojom.SharedQuadState> shared_quad_states; 154 array<cc.mojom.SharedQuadState> shared_quad_states;
157 }; 155 };
OLDNEW
« no previous file with comments | « cc/ipc/filter_operation_struct_traits.h ('k') | cc/ipc/quads.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698