| 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 } | 368 } |
| 369 | 369 |
| 370 static const gfx::Rect& visible_rect(const cc::DrawQuad& quad) { | 370 static const gfx::Rect& visible_rect(const cc::DrawQuad& quad) { |
| 371 return quad.visible_rect; | 371 return quad.visible_rect; |
| 372 } | 372 } |
| 373 | 373 |
| 374 static bool needs_blending(const cc::DrawQuad& quad) { | 374 static bool needs_blending(const cc::DrawQuad& quad) { |
| 375 return quad.needs_blending; | 375 return quad.needs_blending; |
| 376 } | 376 } |
| 377 | 377 |
| 378 static uint32_t shared_quad_state_index(const cc::DrawQuad& quad) { | |
| 379 // TODO(fsamuel): Add shared_quad_state_index field to cc::DrawQuad. | |
| 380 return 0; | |
| 381 } | |
| 382 | |
| 383 static const cc::DrawQuad& debug_border_quad_state(const cc::DrawQuad& quad) { | 378 static const cc::DrawQuad& debug_border_quad_state(const cc::DrawQuad& quad) { |
| 384 return quad; | 379 return quad; |
| 385 } | 380 } |
| 386 | 381 |
| 387 static const cc::DrawQuad& render_pass_quad_state(const cc::DrawQuad& quad) { | 382 static const cc::DrawQuad& render_pass_quad_state(const cc::DrawQuad& quad) { |
| 388 return quad; | 383 return quad; |
| 389 } | 384 } |
| 390 | 385 |
| 391 static const cc::DrawQuad& solid_color_quad_state(const cc::DrawQuad& quad) { | 386 static const cc::DrawQuad& solid_color_quad_state(const cc::DrawQuad& quad) { |
| 392 return quad; | 387 return quad; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 void* context); | 448 void* context); |
| 454 static QuadListArray quads(const cc::QuadList& quad_list) { | 449 static QuadListArray quads(const cc::QuadList& quad_list) { |
| 455 return {quad_list.size(), const_cast<cc::QuadList*>(&quad_list)}; | 450 return {quad_list.size(), const_cast<cc::QuadList*>(&quad_list)}; |
| 456 } | 451 } |
| 457 static bool Read(cc::mojom::QuadListDataView data, cc::QuadList* out); | 452 static bool Read(cc::mojom::QuadListDataView data, cc::QuadList* out); |
| 458 }; | 453 }; |
| 459 | 454 |
| 460 } // namespace mojo | 455 } // namespace mojo |
| 461 | 456 |
| 462 #endif // CC_IPC_QUADS_STRUCT_TRAITS_H_ | 457 #endif // CC_IPC_QUADS_STRUCT_TRAITS_H_ |
| OLD | NEW |