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 #include <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 data.layers_are_clipped_when_surfaces_disabled(); | 431 data.layers_are_clipped_when_surfaces_disabled(); |
432 resets_clip = data.resets_clip(); | 432 resets_clip = data.resets_clip(); |
433 } | 433 } |
434 | 434 |
435 EffectNodeData::EffectNodeData() | 435 EffectNodeData::EffectNodeData() |
436 : opacity(1.f), | 436 : opacity(1.f), |
437 screen_space_opacity(1.f), | 437 screen_space_opacity(1.f), |
438 has_render_surface(false), | 438 has_render_surface(false), |
439 has_copy_request(false), | 439 has_copy_request(false), |
440 has_background_filters(false), | 440 has_background_filters(false), |
| 441 node_or_ancestor_has_background_filters(false), |
| 442 to_screen_opacity_is_animated(false), |
441 is_drawn(true), | 443 is_drawn(true), |
442 has_animated_opacity(false), | 444 has_animated_opacity(false), |
443 effect_changed(false), | 445 effect_changed(false), |
444 num_copy_requests_in_subtree(0), | 446 num_copy_requests_in_subtree(0), |
445 transform_id(0), | 447 transform_id(0), |
446 clip_id(0) {} | 448 clip_id(0) {} |
447 | 449 |
448 EffectNodeData::EffectNodeData(const EffectNodeData& other) = default; | 450 EffectNodeData::EffectNodeData(const EffectNodeData& other) = default; |
449 | 451 |
450 bool EffectNodeData::operator==(const EffectNodeData& other) const { | 452 bool EffectNodeData::operator==(const EffectNodeData& other) const { |
451 return opacity == other.opacity && | 453 return opacity == other.opacity && |
452 screen_space_opacity == other.screen_space_opacity && | 454 screen_space_opacity == other.screen_space_opacity && |
453 has_render_surface == other.has_render_surface && | 455 has_render_surface == other.has_render_surface && |
454 has_copy_request == other.has_copy_request && | 456 has_copy_request == other.has_copy_request && |
455 has_background_filters == other.has_background_filters && | 457 has_background_filters == other.has_background_filters && |
| 458 node_or_ancestor_has_background_filters == |
| 459 other.node_or_ancestor_has_background_filters && |
| 460 to_screen_opacity_is_animated == other.to_screen_opacity_is_animated && |
456 is_drawn == other.is_drawn && | 461 is_drawn == other.is_drawn && |
457 has_animated_opacity == other.has_animated_opacity && | 462 has_animated_opacity == other.has_animated_opacity && |
458 effect_changed == other.effect_changed && | 463 effect_changed == other.effect_changed && |
459 num_copy_requests_in_subtree == other.num_copy_requests_in_subtree && | 464 num_copy_requests_in_subtree == other.num_copy_requests_in_subtree && |
460 transform_id == other.transform_id && clip_id == other.clip_id; | 465 transform_id == other.transform_id && clip_id == other.clip_id; |
461 } | 466 } |
462 | 467 |
463 void EffectNodeData::ToProtobuf(proto::TreeNode* proto) const { | 468 void EffectNodeData::ToProtobuf(proto::TreeNode* proto) const { |
464 DCHECK(!proto->has_effect_node_data()); | 469 DCHECK(!proto->has_effect_node_data()); |
465 proto::EffectNodeData* data = proto->mutable_effect_node_data(); | 470 proto::EffectNodeData* data = proto->mutable_effect_node_data(); |
466 data->set_opacity(opacity); | 471 data->set_opacity(opacity); |
467 data->set_screen_space_opacity(screen_space_opacity); | 472 data->set_screen_space_opacity(screen_space_opacity); |
468 data->set_has_render_surface(has_render_surface); | 473 data->set_has_render_surface(has_render_surface); |
469 data->set_has_copy_request(has_copy_request); | 474 data->set_has_copy_request(has_copy_request); |
470 data->set_has_background_filters(has_background_filters); | 475 data->set_has_background_filters(has_background_filters); |
| 476 data->set_node_or_ancestor_has_background_filters( |
| 477 node_or_ancestor_has_background_filters); |
| 478 data->set_to_screen_opacity_is_animated(to_screen_opacity_is_animated); |
471 data->set_is_drawn(is_drawn); | 479 data->set_is_drawn(is_drawn); |
472 data->set_has_animated_opacity(has_animated_opacity); | 480 data->set_has_animated_opacity(has_animated_opacity); |
473 data->set_effect_changed(effect_changed); | 481 data->set_effect_changed(effect_changed); |
474 data->set_num_copy_requests_in_subtree(num_copy_requests_in_subtree); | 482 data->set_num_copy_requests_in_subtree(num_copy_requests_in_subtree); |
475 data->set_transform_id(transform_id); | 483 data->set_transform_id(transform_id); |
476 data->set_clip_id(clip_id); | 484 data->set_clip_id(clip_id); |
477 } | 485 } |
478 | 486 |
479 void EffectNodeData::FromProtobuf(const proto::TreeNode& proto) { | 487 void EffectNodeData::FromProtobuf(const proto::TreeNode& proto) { |
480 DCHECK(proto.has_effect_node_data()); | 488 DCHECK(proto.has_effect_node_data()); |
481 const proto::EffectNodeData& data = proto.effect_node_data(); | 489 const proto::EffectNodeData& data = proto.effect_node_data(); |
482 | 490 |
483 opacity = data.opacity(); | 491 opacity = data.opacity(); |
484 screen_space_opacity = data.screen_space_opacity(); | 492 screen_space_opacity = data.screen_space_opacity(); |
485 has_render_surface = data.has_render_surface(); | 493 has_render_surface = data.has_render_surface(); |
486 has_copy_request = data.has_copy_request(); | 494 has_copy_request = data.has_copy_request(); |
487 has_background_filters = data.has_background_filters(); | 495 has_background_filters = data.has_background_filters(); |
| 496 node_or_ancestor_has_background_filters = |
| 497 data.node_or_ancestor_has_background_filters(); |
| 498 to_screen_opacity_is_animated = data.to_screen_opacity_is_animated(); |
488 is_drawn = data.is_drawn(); | 499 is_drawn = data.is_drawn(); |
489 has_animated_opacity = data.has_animated_opacity(); | 500 has_animated_opacity = data.has_animated_opacity(); |
490 effect_changed = data.effect_changed(); | 501 effect_changed = data.effect_changed(); |
491 num_copy_requests_in_subtree = data.num_copy_requests_in_subtree(); | 502 num_copy_requests_in_subtree = data.num_copy_requests_in_subtree(); |
492 transform_id = data.transform_id(); | 503 transform_id = data.transform_id(); |
493 clip_id = data.clip_id(); | 504 clip_id = data.clip_id(); |
494 } | 505 } |
495 | 506 |
496 ScrollNodeData::ScrollNodeData() | 507 ScrollNodeData::ScrollNodeData() |
497 : scrollable(false), | 508 : scrollable(false), |
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1850 break; | 1861 break; |
1851 case ALL_TREES: | 1862 case ALL_TREES: |
1852 transform_tree.ResetChangeTracking(); | 1863 transform_tree.ResetChangeTracking(); |
1853 effect_tree.ResetChangeTracking(); | 1864 effect_tree.ResetChangeTracking(); |
1854 } | 1865 } |
1855 changed = false; | 1866 changed = false; |
1856 full_tree_damaged = false; | 1867 full_tree_damaged = false; |
1857 } | 1868 } |
1858 | 1869 |
1859 } // namespace cc | 1870 } // namespace cc |
OLD | NEW |