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

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

Issue 2229553004: cc: Implement UnionTraits for DrawQuads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comment Created 4 years, 4 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 | « no previous file | cc/ipc/quads_struct_traits.h » ('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";
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 uint32 u_plane_resource_id; 91 uint32 u_plane_resource_id;
92 uint32 v_plane_resource_id; 92 uint32 v_plane_resource_id;
93 uint32 a_plane_resource_id; 93 uint32 a_plane_resource_id;
94 YUVColorSpace color_space; 94 YUVColorSpace color_space;
95 float resource_offset; 95 float resource_offset;
96 float resource_multiplier; 96 float resource_multiplier;
97 uint32 bits_per_channel; 97 uint32 bits_per_channel;
98 }; 98 };
99 99
100 enum Material { 100 enum Material {
101 INVALID,
102 DEBUG_BORDER, 101 DEBUG_BORDER,
103 PICTURE_CONTENT,
104 RENDER_PASS, 102 RENDER_PASS,
105 SOLID_COLOR, 103 SOLID_COLOR,
106 STREAM_VIDEO_CONTENT, 104 STREAM_VIDEO_CONTENT,
107 SURFACE_CONTENT, 105 SURFACE_CONTENT,
108 TEXTURE_CONTENT, 106 TEXTURE_CONTENT,
109 TILED_CONTENT, 107 TILED_CONTENT,
110 YUV_VIDEO_CONTENT, 108 YUV_VIDEO_CONTENT,
111 }; 109 };
112 110
111 union DrawQuadState {
112 DebugBorderQuadState debug_border_quad_state;
113 RenderPassQuadState render_pass_quad_state;
114 SolidColorQuadState solid_color_quad_state;
115 SurfaceQuadState surface_quad_state;
116 TextureQuadState texture_quad_state;
117 TileQuadState tile_quad_state;
118 StreamVideoQuadState stream_video_quad_state;
119 YUVVideoQuadState yuv_video_quad_state;
120 };
121
113 struct DrawQuad { 122 struct DrawQuad {
114 Material material; 123 Material material;
yzshen1 2016/08/09 17:42:04 Could we remove this enum entirely?
Fady Samuel 2016/08/09 18:23:09 Done.
115 124
116 // This rect, after applying the quad_transform(), gives the geometry that 125 // This rect, after applying the quad_transform(), gives the geometry that
117 // this quad should draw to. This rect lives in content space. 126 // this quad should draw to. This rect lives in content space.
118 gfx.mojom.Rect rect; 127 gfx.mojom.Rect rect;
119 128
120 // This specifies the region of the quad that is opaque. This rect lives in 129 // This specifies the region of the quad that is opaque. This rect lives in
121 // content space. 130 // content space.
122 gfx.mojom.Rect opaque_rect; 131 gfx.mojom.Rect opaque_rect;
123 132
124 // Allows changing the rect that gets drawn to make it smaller. This value 133 // Allows changing the rect that gets drawn to make it smaller. This value
125 // should be clipped to |rect|. This rect lives in content space. 134 // should be clipped to |rect|. This rect lives in content space.
126 gfx.mojom.Rect visible_rect; 135 gfx.mojom.Rect visible_rect;
127 136
128 // Allows changing the rect that gets drawn to make it smaller. This value 137 // Allows changing the rect that gets drawn to make it smaller. This value
129 // should be clipped to |rect|. This rect lives in content space. 138 // should be clipped to |rect|. This rect lives in content space.
130 bool needs_blending; 139 bool needs_blending;
131 140
132 // Optionally holds a SharedQuadState (transforms etc) shared by multiple 141 // Optionally holds a SharedQuadState (transforms etc) shared by multiple
133 // quads. 142 // quads.
134 SharedQuadState? sqs; 143 SharedQuadState? sqs;
135 144
136 // Only one of the following will be set, depending on the material. 145 DrawQuadState draw_quad_state;
137 DebugBorderQuadState? debug_border_quad_state;
138 RenderPassQuadState? render_pass_quad_state;
139 SolidColorQuadState? solid_color_quad_state;
140 SurfaceQuadState? surface_quad_state;
141 TextureQuadState? texture_quad_state;
142 TileQuadState? tile_quad_state;
143 StreamVideoQuadState? stream_video_quad_state;
144 YUVVideoQuadState? yuv_video_quad_state;
145 }; 146 };
OLDNEW
« no previous file with comments | « no previous file | cc/ipc/quads_struct_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698