Chromium Code Reviews| Index: cc/ipc/quads.mojom |
| diff --git a/cc/ipc/quads.mojom b/cc/ipc/quads.mojom |
| index 772525891325f0c5383b46c25f3a047483a19508..c4e15d135a6b9ed6d1d9de2ab793e01ba8938cf7 100644 |
| --- a/cc/ipc/quads.mojom |
| +++ b/cc/ipc/quads.mojom |
| @@ -98,9 +98,7 @@ struct YUVVideoQuadState { |
| }; |
| enum Material { |
|
yzshen1
2016/08/09 18:29:53
Could we also remove this definition?
Fady Samuel
2016/08/09 18:42:50
Done.
|
| - INVALID, |
| DEBUG_BORDER, |
| - PICTURE_CONTENT, |
| RENDER_PASS, |
| SOLID_COLOR, |
| STREAM_VIDEO_CONTENT, |
| @@ -110,9 +108,18 @@ enum Material { |
| YUV_VIDEO_CONTENT, |
| }; |
| -struct DrawQuad { |
| - Material material; |
| +union DrawQuadState { |
| + DebugBorderQuadState debug_border_quad_state; |
| + RenderPassQuadState render_pass_quad_state; |
| + SolidColorQuadState solid_color_quad_state; |
| + SurfaceQuadState surface_quad_state; |
| + TextureQuadState texture_quad_state; |
| + TileQuadState tile_quad_state; |
| + StreamVideoQuadState stream_video_quad_state; |
| + YUVVideoQuadState yuv_video_quad_state; |
| +}; |
| +struct DrawQuad { |
| // This rect, after applying the quad_transform(), gives the geometry that |
| // this quad should draw to. This rect lives in content space. |
| gfx.mojom.Rect rect; |
| @@ -133,13 +140,5 @@ struct DrawQuad { |
| // quads. |
| SharedQuadState? sqs; |
| - // Only one of the following will be set, depending on the material. |
| - DebugBorderQuadState? debug_border_quad_state; |
| - RenderPassQuadState? render_pass_quad_state; |
| - SolidColorQuadState? solid_color_quad_state; |
| - SurfaceQuadState? surface_quad_state; |
| - TextureQuadState? texture_quad_state; |
| - TileQuadState? tile_quad_state; |
| - StreamVideoQuadState? stream_video_quad_state; |
| - YUVVideoQuadState? yuv_video_quad_state; |
| + DrawQuadState draw_quad_state; |
| }; |