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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/ipc/quads_struct_traits.h » ('j') | cc/ipc/quads_struct_traits.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/ipc/quads.mojom
diff --git a/cc/ipc/quads.mojom b/cc/ipc/quads.mojom
index 772525891325f0c5383b46c25f3a047483a19508..31c6165519f21d570a82adce6f3474b97a0f1c8e 100644
--- a/cc/ipc/quads.mojom
+++ b/cc/ipc/quads.mojom
@@ -97,22 +97,18 @@ struct YUVVideoQuadState {
uint32 bits_per_channel;
};
-enum Material {
- INVALID,
- DEBUG_BORDER,
- PICTURE_CONTENT,
- RENDER_PASS,
- SOLID_COLOR,
- STREAM_VIDEO_CONTENT,
- SURFACE_CONTENT,
- TEXTURE_CONTENT,
- TILED_CONTENT,
- YUV_VIDEO_CONTENT,
+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;
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.
+ YUVVideoQuadState yuv_video_quad_state;
};
struct DrawQuad {
- Material material;
-
// 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 +129,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;
};
« 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