| OLD | NEW |
| 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"; |
| 11 import "ui/gfx/geometry/mojo/geometry.mojom"; | 11 import "ui/gfx/geometry/mojo/geometry.mojom"; |
| 12 import "ui/gfx/mojo/transform.mojom"; | 12 import "ui/gfx/mojo/transform.mojom"; |
| 13 | 13 |
| 14 struct Color { | |
| 15 uint32 rgba; | |
| 16 }; | |
| 17 | |
| 18 struct DebugBorderQuadState { | 14 struct DebugBorderQuadState { |
| 19 // Debug border color. | 15 // Debug border color. |
| 20 Color color; | 16 uint32 color; |
| 21 | 17 |
| 22 // Debug border width. | 18 // Debug border width. |
| 23 int32 width; | 19 int32 width; |
| 24 }; | 20 }; |
| 25 | 21 |
| 26 // TODO(jamesr): Populate subtype fields. | 22 // TODO(jamesr): Populate subtype fields. |
| 27 struct IoSurfaceContentQuadState {}; | 23 struct IoSurfaceContentQuadState {}; |
| 28 | 24 |
| 29 struct RenderPassQuadState { | 25 struct RenderPassQuadState { |
| 30 cc.mojom.RenderPassId render_pass_id; | 26 cc.mojom.RenderPassId render_pass_id; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 42 // parameters for pixel-moving filters. This scale should include | 38 // parameters for pixel-moving filters. This scale should include |
| 43 // content-to-target-space scale, and device pixel ratio. | 39 // content-to-target-space scale, and device pixel ratio. |
| 44 gfx.mojom.PointF filters_scale; | 40 gfx.mojom.PointF filters_scale; |
| 45 | 41 |
| 46 // Post-processing filters, applied to the pixels showing through the | 42 // Post-processing filters, applied to the pixels showing through the |
| 47 // background of the render pass, from behind it. | 43 // background of the render pass, from behind it. |
| 48 cc.mojom.FilterOperations background_filters; | 44 cc.mojom.FilterOperations background_filters; |
| 49 }; | 45 }; |
| 50 | 46 |
| 51 struct SolidColorQuadState { | 47 struct SolidColorQuadState { |
| 52 Color color; | 48 uint32 color; |
| 53 bool force_anti_aliasing_off; | 49 bool force_anti_aliasing_off; |
| 54 }; | 50 }; |
| 55 | 51 |
| 56 struct SurfaceQuadState { | 52 struct SurfaceQuadState { |
| 57 cc.mojom.SurfaceId surface; | 53 cc.mojom.SurfaceId surface; |
| 58 }; | 54 }; |
| 59 | 55 |
| 60 struct TextureQuadState { | 56 struct TextureQuadState { |
| 61 uint32 resource_id; | 57 uint32 resource_id; |
| 62 bool premultiplied_alpha; | 58 bool premultiplied_alpha; |
| 63 gfx.mojom.PointF uv_top_left; | 59 gfx.mojom.PointF uv_top_left; |
| 64 gfx.mojom.PointF uv_bottom_right; | 60 gfx.mojom.PointF uv_bottom_right; |
| 65 Color background_color; | 61 uint32 background_color; |
| 66 array<float, 4> vertex_opacity; | 62 array<float, 4> vertex_opacity; |
| 67 bool y_flipped; | 63 bool y_flipped; |
| 68 bool nearest_neighbor; | 64 bool nearest_neighbor; |
| 69 bool secure_output_only; | 65 bool secure_output_only; |
| 70 }; | 66 }; |
| 71 | 67 |
| 72 struct TileQuadState { | 68 struct TileQuadState { |
| 73 gfx.mojom.RectF tex_coord_rect; | 69 gfx.mojom.RectF tex_coord_rect; |
| 74 gfx.mojom.Size texture_size; | 70 gfx.mojom.Size texture_size; |
| 75 bool swizzle_contents; | 71 bool swizzle_contents; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 102 enum Material { | 98 enum Material { |
| 103 DEBUG_BORDER = 1, | 99 DEBUG_BORDER = 1, |
| 104 PICTURE_CONTENT, | 100 PICTURE_CONTENT, |
| 105 RENDER_PASS, | 101 RENDER_PASS, |
| 106 SOLID_COLOR, | 102 SOLID_COLOR, |
| 107 STREAM_VIDEO_CONTENT, | 103 STREAM_VIDEO_CONTENT, |
| 108 SURFACE_CONTENT, | 104 SURFACE_CONTENT, |
| 109 TEXTURE_CONTENT, | 105 TEXTURE_CONTENT, |
| 110 TILED_CONTENT, | 106 TILED_CONTENT, |
| 111 YUV_VIDEO_CONTENT, | 107 YUV_VIDEO_CONTENT, |
| 108 MATERIAL_LAST = YUV_VIDEO_CONTENT, |
| 112 }; | 109 }; |
| 113 | 110 |
| 114 struct DrawQuad { | 111 struct DrawQuad { |
| 115 Material material; | 112 Material material; |
| 116 | 113 |
| 117 // This rect, after applying the quad_transform(), gives the geometry that | 114 // This rect, after applying the quad_transform(), gives the geometry that |
| 118 // this quad should draw to. This rect lives in content space. | 115 // this quad should draw to. This rect lives in content space. |
| 119 gfx.mojom.Rect rect; | 116 gfx.mojom.Rect rect; |
| 120 | 117 |
| 121 // This specifies the region of the quad that is opaque. This rect lives in | 118 // This specifies the region of the quad that is opaque. This rect lives in |
| (...skipping 17 matching lines...) Expand all Loading... |
| 139 IoSurfaceContentQuadState? io_surface_quad_state; | 136 IoSurfaceContentQuadState? io_surface_quad_state; |
| 140 RenderPassQuadState? render_pass_quad_state; | 137 RenderPassQuadState? render_pass_quad_state; |
| 141 SolidColorQuadState? solid_color_quad_state; | 138 SolidColorQuadState? solid_color_quad_state; |
| 142 SurfaceQuadState? surface_quad_state; | 139 SurfaceQuadState? surface_quad_state; |
| 143 TextureQuadState? texture_quad_state; | 140 TextureQuadState? texture_quad_state; |
| 144 TileQuadState? tile_quad_state; | 141 TileQuadState? tile_quad_state; |
| 145 StreamVideoQuadState? stream_video_quad_state; | 142 StreamVideoQuadState? stream_video_quad_state; |
| 146 YUVVideoQuadState? yuv_video_quad_state; | 143 YUVVideoQuadState? yuv_video_quad_state; |
| 147 }; | 144 }; |
| 148 | 145 |
| 146 struct MyDrawQuad { |
| 147 Material material; |
| 148 gfx.mojom.Rect rect; |
| 149 gfx.mojom.Rect opaque_rect; |
| 150 gfx.mojom.Rect visible_rect; |
| 151 bool needs_blending; |
| 152 uint32 shared_quad_state_index; |
| 153 DebugBorderQuadState? debug_border_quad_state; |
| 154 IoSurfaceContentQuadState? io_surface_quad_state; |
| 155 RenderPassQuadState? render_pass_quad_state; |
| 156 SolidColorQuadState? solid_color_quad_state; |
| 157 SurfaceQuadState? surface_quad_state; |
| 158 TextureQuadState? texture_quad_state; |
| 159 TileQuadState? tile_quad_state; |
| 160 StreamVideoQuadState? stream_video_quad_state; |
| 161 YUVVideoQuadState? yuv_video_quad_state; |
| 162 }; |
| 163 |
| 164 struct QuadList { |
| 165 array<Material> quad_types; |
| 166 array<MyDrawQuad> quads; |
| 167 }; |
| 168 |
| 149 struct RenderPass { | 169 struct RenderPass { |
| 150 cc.mojom.RenderPassId id; | 170 cc.mojom.RenderPassId id; |
| 151 gfx.mojom.Rect output_rect; | 171 gfx.mojom.Rect output_rect; |
| 152 gfx.mojom.Rect damage_rect; | 172 gfx.mojom.Rect damage_rect; |
| 153 gfx.mojom.Transform transform_to_root_target; | 173 gfx.mojom.Transform transform_to_root_target; |
| 154 bool has_transparent_background; | 174 bool has_transparent_background; |
| 155 array<DrawQuad> quads; | 175 array<DrawQuad> quads; |
| 156 array<cc.mojom.SharedQuadState> shared_quad_states; | 176 array<cc.mojom.SharedQuadState> shared_quad_states; |
| 157 }; | 177 }; |
| OLD | NEW |