OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CC_IPC_QUADS_STRUCT_TRAITS_H_ | 5 #ifndef CC_IPC_QUADS_STRUCT_TRAITS_H_ |
6 #define CC_IPC_QUADS_STRUCT_TRAITS_H_ | 6 #define CC_IPC_QUADS_STRUCT_TRAITS_H_ |
7 | 7 |
8 #include "cc/ipc/filter_operation_struct_traits.h" | 8 #include "cc/ipc/filter_operation_struct_traits.h" |
9 #include "cc/ipc/filter_operations_struct_traits.h" | 9 #include "cc/ipc/filter_operations_struct_traits.h" |
10 #include "cc/ipc/quads.mojom.h" | 10 #include "cc/ipc/quads.mojom.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 cc::RenderPassDrawQuad::MaterialCast(&input); | 163 cc::RenderPassDrawQuad::MaterialCast(&input); |
164 return quad->filters; | 164 return quad->filters; |
165 } | 165 } |
166 | 166 |
167 static const gfx::Vector2dF& filters_scale(const cc::DrawQuad& input) { | 167 static const gfx::Vector2dF& filters_scale(const cc::DrawQuad& input) { |
168 const cc::RenderPassDrawQuad* quad = | 168 const cc::RenderPassDrawQuad* quad = |
169 cc::RenderPassDrawQuad::MaterialCast(&input); | 169 cc::RenderPassDrawQuad::MaterialCast(&input); |
170 return quad->filters_scale; | 170 return quad->filters_scale; |
171 } | 171 } |
172 | 172 |
| 173 static const gfx::PointF& filters_origin(const cc::DrawQuad& input) { |
| 174 const cc::RenderPassDrawQuad* quad = |
| 175 cc::RenderPassDrawQuad::MaterialCast(&input); |
| 176 return quad->filters_origin; |
| 177 } |
| 178 |
173 static const cc::FilterOperations& background_filters( | 179 static const cc::FilterOperations& background_filters( |
174 const cc::DrawQuad& input) { | 180 const cc::DrawQuad& input) { |
175 const cc::RenderPassDrawQuad* quad = | 181 const cc::RenderPassDrawQuad* quad = |
176 cc::RenderPassDrawQuad::MaterialCast(&input); | 182 cc::RenderPassDrawQuad::MaterialCast(&input); |
177 return quad->background_filters; | 183 return quad->background_filters; |
178 } | 184 } |
179 | 185 |
180 static bool Read(cc::mojom::RenderPassQuadStateDataView data, | 186 static bool Read(cc::mojom::RenderPassQuadStateDataView data, |
181 cc::DrawQuad* out); | 187 cc::DrawQuad* out); |
182 }; | 188 }; |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 dq.shared_quad_state = current_sqs; | 477 dq.shared_quad_state = current_sqs; |
472 return dq; | 478 return dq; |
473 } | 479 } |
474 | 480 |
475 static size_t GetSize(const cc::QuadList& input) { return input.size(); } | 481 static size_t GetSize(const cc::QuadList& input) { return input.size(); } |
476 }; | 482 }; |
477 | 483 |
478 } // namespace mojo | 484 } // namespace mojo |
479 | 485 |
480 #endif // CC_IPC_QUADS_STRUCT_TRAITS_H_ | 486 #endif // CC_IPC_QUADS_STRUCT_TRAITS_H_ |
OLD | NEW |