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

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: Addressed alphabetization 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 28 matching lines...) Expand all
39 // Post-processing filters, applied to the pixels showing through the 39 // Post-processing filters, applied to the pixels showing through the
40 // background of the render pass, from behind it. 40 // background of the render pass, from behind it.
41 cc.mojom.FilterOperations background_filters; 41 cc.mojom.FilterOperations background_filters;
42 }; 42 };
43 43
44 struct SolidColorQuadState { 44 struct SolidColorQuadState {
45 uint32 color; 45 uint32 color;
46 bool force_anti_aliasing_off; 46 bool force_anti_aliasing_off;
47 }; 47 };
48 48
49 struct StreamVideoQuadState {
50 uint32 resource_id;
51 gfx.mojom.Size resource_size_in_pixels;
52 gfx.mojom.Transform matrix;
53 };
54
49 struct SurfaceQuadState { 55 struct SurfaceQuadState {
50 cc.mojom.SurfaceId surface; 56 cc.mojom.SurfaceId surface;
51 }; 57 };
52 58
53 struct TextureQuadState { 59 struct TextureQuadState {
54 uint32 resource_id; 60 uint32 resource_id;
55 bool premultiplied_alpha; 61 bool premultiplied_alpha;
56 gfx.mojom.PointF uv_top_left; 62 gfx.mojom.PointF uv_top_left;
57 gfx.mojom.PointF uv_bottom_right; 63 gfx.mojom.PointF uv_bottom_right;
58 uint32 background_color; 64 uint32 background_color;
59 array<float, 4> vertex_opacity; 65 array<float, 4> vertex_opacity;
60 bool y_flipped; 66 bool y_flipped;
61 bool nearest_neighbor; 67 bool nearest_neighbor;
62 bool secure_output_only; 68 bool secure_output_only;
63 }; 69 };
64 70
65 struct TileQuadState { 71 struct TileQuadState {
66 gfx.mojom.RectF tex_coord_rect; 72 gfx.mojom.RectF tex_coord_rect;
67 gfx.mojom.Size texture_size; 73 gfx.mojom.Size texture_size;
68 bool swizzle_contents; 74 bool swizzle_contents;
69 uint32 resource_id; 75 uint32 resource_id;
70 bool nearest_neighbor; 76 bool nearest_neighbor;
71 }; 77 };
72 78
73 struct StreamVideoQuadState {
74 uint32 resource_id;
75 gfx.mojom.Size resource_size_in_pixels;
76 gfx.mojom.Transform matrix;
77 };
78
79 enum YUVColorSpace { 79 enum YUVColorSpace {
80 REC_601, // SDTV standard with restricted "studio swing" color range. 80 REC_601, // SDTV standard with restricted "studio swing" color range.
81 REC_709, // HDTV standard with restricted "studio swing" color range. 81 REC_709, // HDTV standard with restricted "studio swing" color range.
82 JPEG, // Full color range [0, 255] JPEG color space. 82 JPEG, // Full color range [0, 255] JPEG color space.
83 }; 83 };
84 84
85 struct YUVVideoQuadState { 85 struct YUVVideoQuadState {
86 gfx.mojom.RectF ya_tex_coord_rect; 86 gfx.mojom.RectF ya_tex_coord_rect;
87 gfx.mojom.RectF uv_tex_coord_rect; 87 gfx.mojom.RectF uv_tex_coord_rect;
88 gfx.mojom.Size ya_tex_size; 88 gfx.mojom.Size ya_tex_size;
89 gfx.mojom.Size uv_tex_size; 89 gfx.mojom.Size uv_tex_size;
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 StreamVideoQuadState stream_video_quad_state;
105 SOLID_COLOR, 105 SurfaceQuadState surface_quad_state;
106 STREAM_VIDEO_CONTENT, 106 TextureQuadState texture_quad_state;
107 SURFACE_CONTENT, 107 TileQuadState tile_quad_state;
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698