| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 resets_clip = data.resets_clip(); | 443 resets_clip = data.resets_clip(); |
| 444 } | 444 } |
| 445 | 445 |
| 446 EffectNodeData::EffectNodeData() | 446 EffectNodeData::EffectNodeData() |
| 447 : opacity(1.f), | 447 : opacity(1.f), |
| 448 screen_space_opacity(1.f), | 448 screen_space_opacity(1.f), |
| 449 has_render_surface(false), | 449 has_render_surface(false), |
| 450 render_surface(nullptr), | 450 render_surface(nullptr), |
| 451 has_copy_request(false), | 451 has_copy_request(false), |
| 452 has_background_filters(false), | 452 has_background_filters(false), |
| 453 node_or_ancestor_has_background_filters(false), | |
| 454 to_screen_opacity_is_animated(false), | |
| 455 hidden_by_backface_visibility(false), | 453 hidden_by_backface_visibility(false), |
| 456 double_sided(false), | 454 double_sided(false), |
| 457 is_drawn(true), | 455 is_drawn(true), |
| 458 has_animated_opacity(false), | 456 has_animated_opacity(false), |
| 459 effect_changed(false), | 457 effect_changed(false), |
| 460 num_copy_requests_in_subtree(0), | 458 num_copy_requests_in_subtree(0), |
| 461 transform_id(0), | 459 transform_id(0), |
| 462 clip_id(0), | 460 clip_id(0), |
| 463 target_id(0) {} | 461 target_id(0) {} |
| 464 | 462 |
| 465 EffectNodeData::EffectNodeData(const EffectNodeData& other) = default; | 463 EffectNodeData::EffectNodeData(const EffectNodeData& other) = default; |
| 466 | 464 |
| 467 bool EffectNodeData::operator==(const EffectNodeData& other) const { | 465 bool EffectNodeData::operator==(const EffectNodeData& other) const { |
| 468 return opacity == other.opacity && | 466 return opacity == other.opacity && |
| 469 screen_space_opacity == other.screen_space_opacity && | 467 screen_space_opacity == other.screen_space_opacity && |
| 470 has_render_surface == other.has_render_surface && | 468 has_render_surface == other.has_render_surface && |
| 471 has_copy_request == other.has_copy_request && | 469 has_copy_request == other.has_copy_request && |
| 472 has_background_filters == other.has_background_filters && | 470 has_background_filters == other.has_background_filters && |
| 473 node_or_ancestor_has_background_filters == | |
| 474 other.node_or_ancestor_has_background_filters && | |
| 475 to_screen_opacity_is_animated == other.to_screen_opacity_is_animated && | |
| 476 hidden_by_backface_visibility == other.hidden_by_backface_visibility && | 471 hidden_by_backface_visibility == other.hidden_by_backface_visibility && |
| 477 double_sided == other.double_sided && is_drawn == other.is_drawn && | 472 double_sided == other.double_sided && is_drawn == other.is_drawn && |
| 478 has_animated_opacity == other.has_animated_opacity && | 473 has_animated_opacity == other.has_animated_opacity && |
| 479 effect_changed == other.effect_changed && | 474 effect_changed == other.effect_changed && |
| 480 num_copy_requests_in_subtree == other.num_copy_requests_in_subtree && | 475 num_copy_requests_in_subtree == other.num_copy_requests_in_subtree && |
| 481 transform_id == other.transform_id && clip_id == other.clip_id && | 476 transform_id == other.transform_id && clip_id == other.clip_id && |
| 482 target_id == other.target_id; | 477 target_id == other.target_id; |
| 483 } | 478 } |
| 484 | 479 |
| 485 void EffectNodeData::ToProtobuf(proto::TreeNode* proto) const { | 480 void EffectNodeData::ToProtobuf(proto::TreeNode* proto) const { |
| 486 DCHECK(!proto->has_effect_node_data()); | 481 DCHECK(!proto->has_effect_node_data()); |
| 487 proto::EffectNodeData* data = proto->mutable_effect_node_data(); | 482 proto::EffectNodeData* data = proto->mutable_effect_node_data(); |
| 488 data->set_opacity(opacity); | 483 data->set_opacity(opacity); |
| 489 data->set_screen_space_opacity(screen_space_opacity); | 484 data->set_screen_space_opacity(screen_space_opacity); |
| 490 data->set_has_render_surface(has_render_surface); | 485 data->set_has_render_surface(has_render_surface); |
| 491 data->set_has_copy_request(has_copy_request); | 486 data->set_has_copy_request(has_copy_request); |
| 492 data->set_has_background_filters(has_background_filters); | 487 data->set_has_background_filters(has_background_filters); |
| 493 data->set_node_or_ancestor_has_background_filters( | |
| 494 node_or_ancestor_has_background_filters); | |
| 495 data->set_to_screen_opacity_is_animated(to_screen_opacity_is_animated); | |
| 496 data->set_hidden_by_backface_visibility(hidden_by_backface_visibility); | 488 data->set_hidden_by_backface_visibility(hidden_by_backface_visibility); |
| 497 data->set_double_sided(double_sided); | 489 data->set_double_sided(double_sided); |
| 498 data->set_is_drawn(is_drawn); | 490 data->set_is_drawn(is_drawn); |
| 499 data->set_has_animated_opacity(has_animated_opacity); | 491 data->set_has_animated_opacity(has_animated_opacity); |
| 500 data->set_effect_changed(effect_changed); | 492 data->set_effect_changed(effect_changed); |
| 501 data->set_num_copy_requests_in_subtree(num_copy_requests_in_subtree); | 493 data->set_num_copy_requests_in_subtree(num_copy_requests_in_subtree); |
| 502 data->set_transform_id(transform_id); | 494 data->set_transform_id(transform_id); |
| 503 data->set_clip_id(clip_id); | 495 data->set_clip_id(clip_id); |
| 504 data->set_target_id(target_id); | 496 data->set_target_id(target_id); |
| 505 } | 497 } |
| 506 | 498 |
| 507 void EffectNodeData::FromProtobuf(const proto::TreeNode& proto) { | 499 void EffectNodeData::FromProtobuf(const proto::TreeNode& proto) { |
| 508 DCHECK(proto.has_effect_node_data()); | 500 DCHECK(proto.has_effect_node_data()); |
| 509 const proto::EffectNodeData& data = proto.effect_node_data(); | 501 const proto::EffectNodeData& data = proto.effect_node_data(); |
| 510 | 502 |
| 511 opacity = data.opacity(); | 503 opacity = data.opacity(); |
| 512 screen_space_opacity = data.screen_space_opacity(); | 504 screen_space_opacity = data.screen_space_opacity(); |
| 513 has_render_surface = data.has_render_surface(); | 505 has_render_surface = data.has_render_surface(); |
| 514 has_copy_request = data.has_copy_request(); | 506 has_copy_request = data.has_copy_request(); |
| 515 has_background_filters = data.has_background_filters(); | 507 has_background_filters = data.has_background_filters(); |
| 516 node_or_ancestor_has_background_filters = | |
| 517 data.node_or_ancestor_has_background_filters(); | |
| 518 to_screen_opacity_is_animated = data.to_screen_opacity_is_animated(); | |
| 519 hidden_by_backface_visibility = data.hidden_by_backface_visibility(); | 508 hidden_by_backface_visibility = data.hidden_by_backface_visibility(); |
| 520 double_sided = data.double_sided(); | 509 double_sided = data.double_sided(); |
| 521 is_drawn = data.is_drawn(); | 510 is_drawn = data.is_drawn(); |
| 522 has_animated_opacity = data.has_animated_opacity(); | 511 has_animated_opacity = data.has_animated_opacity(); |
| 523 effect_changed = data.effect_changed(); | 512 effect_changed = data.effect_changed(); |
| 524 num_copy_requests_in_subtree = data.num_copy_requests_in_subtree(); | 513 num_copy_requests_in_subtree = data.num_copy_requests_in_subtree(); |
| 525 transform_id = data.transform_id(); | 514 transform_id = data.transform_id(); |
| 526 clip_id = data.clip_id(); | 515 clip_id = data.clip_id(); |
| 527 target_id = data.target_id(); | 516 target_id = data.target_id(); |
| 528 } | 517 } |
| (...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1949 break; | 1938 break; |
| 1950 case ALL_TREES: | 1939 case ALL_TREES: |
| 1951 transform_tree.ResetChangeTracking(); | 1940 transform_tree.ResetChangeTracking(); |
| 1952 effect_tree.ResetChangeTracking(); | 1941 effect_tree.ResetChangeTracking(); |
| 1953 } | 1942 } |
| 1954 changed = false; | 1943 changed = false; |
| 1955 full_tree_damaged = false; | 1944 full_tree_damaged = false; |
| 1956 } | 1945 } |
| 1957 | 1946 |
| 1958 } // namespace cc | 1947 } // namespace cc |
| OLD | NEW |