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

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: More cleanup: Got rid of material and collapsed a method call 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 union DrawQuadState {
101 INVALID, 101 DebugBorderQuadState debug_border_quad_state;
102 DEBUG_BORDER, 102 RenderPassQuadState render_pass_quad_state;
103 PICTURE_CONTENT, 103 SolidColorQuadState solid_color_quad_state;
104 RENDER_PASS, 104 SurfaceQuadState surface_quad_state;
105 SOLID_COLOR, 105 TextureQuadState texture_quad_state;
106 STREAM_VIDEO_CONTENT, 106 TileQuadState tile_quad_state;
107 SURFACE_CONTENT, 107 StreamVideoQuadState stream_video_quad_state;
danakj 2016/08/09 21:37:23 nit: keep it sorted? easier to find things then.
Fady Samuel 2016/08/10 13:29:03 Done.
108 TEXTURE_CONTENT, 108 YUVVideoQuadState yuv_video_quad_state;
109 TILED_CONTENT,
110 YUV_VIDEO_CONTENT,
111 }; 109 };
112 110
113 struct DrawQuad { 111 struct DrawQuad {
114 Material material;
115
116 // This rect, after applying the quad_transform(), gives the geometry that 112 // This rect, after applying the quad_transform(), gives the geometry that
117 // this quad should draw to. This rect lives in content space. 113 // this quad should draw to. This rect lives in content space.
118 gfx.mojom.Rect rect; 114 gfx.mojom.Rect rect;
119 115
120 // This specifies the region of the quad that is opaque. This rect lives in 116 // This specifies the region of the quad that is opaque. This rect lives in
121 // content space. 117 // content space.
122 gfx.mojom.Rect opaque_rect; 118 gfx.mojom.Rect opaque_rect;
123 119
124 // Allows changing the rect that gets drawn to make it smaller. This value 120 // 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. 121 // should be clipped to |rect|. This rect lives in content space.
126 gfx.mojom.Rect visible_rect; 122 gfx.mojom.Rect visible_rect;
127 123
128 // Allows changing the rect that gets drawn to make it smaller. This value 124 // 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. 125 // should be clipped to |rect|. This rect lives in content space.
130 bool needs_blending; 126 bool needs_blending;
131 127
132 // Optionally holds a SharedQuadState (transforms etc) shared by multiple 128 // Optionally holds a SharedQuadState (transforms etc) shared by multiple
133 // quads. 129 // quads.
134 SharedQuadState? sqs; 130 SharedQuadState? sqs;
135 131
136 // Only one of the following will be set, depending on the material. 132 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 }; 133 };
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