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

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: Cleanup according to Yuzhu's suggestion 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') | cc/ipc/quads_struct_traits.cc » ('J')
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 uint32 y_plane_resource_id; 90 uint32 y_plane_resource_id;
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 {
yzshen1 2016/08/09 18:29:53 Could we also remove this definition?
Fady Samuel 2016/08/09 18:42:50 Done.
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;
115
116 // This rect, after applying the quad_transform(), gives the geometry that 123 // This rect, after applying the quad_transform(), gives the geometry that
117 // this quad should draw to. This rect lives in content space. 124 // this quad should draw to. This rect lives in content space.
118 gfx.mojom.Rect rect; 125 gfx.mojom.Rect rect;
119 126
120 // This specifies the region of the quad that is opaque. This rect lives in 127 // This specifies the region of the quad that is opaque. This rect lives in
121 // content space. 128 // content space.
122 gfx.mojom.Rect opaque_rect; 129 gfx.mojom.Rect opaque_rect;
123 130
124 // Allows changing the rect that gets drawn to make it smaller. This value 131 // 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. 132 // should be clipped to |rect|. This rect lives in content space.
126 gfx.mojom.Rect visible_rect; 133 gfx.mojom.Rect visible_rect;
127 134
128 // 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
129 // should be clipped to |rect|. This rect lives in content space. 136 // should be clipped to |rect|. This rect lives in content space.
130 bool needs_blending; 137 bool needs_blending;
131 138
132 // Optionally holds a SharedQuadState (transforms etc) shared by multiple 139 // Optionally holds a SharedQuadState (transforms etc) shared by multiple
133 // quads. 140 // quads.
134 SharedQuadState? sqs; 141 SharedQuadState? sqs;
135 142
136 // Only one of the following will be set, depending on the material. 143 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 }; 144 };
OLDNEW
« no previous file with comments | « no previous file | cc/ipc/quads_struct_traits.h » ('j') | cc/ipc/quads_struct_traits.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698