| 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 is_drawn(true), | 441 is_drawn(true), |
| 442 has_animated_opacity(false), | 442 has_animated_opacity(false), |
| 443 effect_changed(false), | 443 effect_changed(false), |
| 444 num_copy_requests_in_subtree(0), | 444 num_copy_requests_in_subtree(0), |
| 445 transform_id(0), | 445 transform_id(0), |
| 446 clip_id(0) {} | 446 clip_id(0), |
| 447 target_id(0) {} |
| 447 | 448 |
| 448 EffectNodeData::EffectNodeData(const EffectNodeData& other) = default; | 449 EffectNodeData::EffectNodeData(const EffectNodeData& other) = default; |
| 449 | 450 |
| 450 bool EffectNodeData::operator==(const EffectNodeData& other) const { | 451 bool EffectNodeData::operator==(const EffectNodeData& other) const { |
| 451 return opacity == other.opacity && | 452 return opacity == other.opacity && |
| 452 screen_space_opacity == other.screen_space_opacity && | 453 screen_space_opacity == other.screen_space_opacity && |
| 453 has_render_surface == other.has_render_surface && | 454 has_render_surface == other.has_render_surface && |
| 454 has_copy_request == other.has_copy_request && | 455 has_copy_request == other.has_copy_request && |
| 455 has_background_filters == other.has_background_filters && | 456 has_background_filters == other.has_background_filters && |
| 456 is_drawn == other.is_drawn && | 457 is_drawn == other.is_drawn && |
| 457 has_animated_opacity == other.has_animated_opacity && | 458 has_animated_opacity == other.has_animated_opacity && |
| 458 effect_changed == other.effect_changed && | 459 effect_changed == other.effect_changed && |
| 459 num_copy_requests_in_subtree == other.num_copy_requests_in_subtree && | 460 num_copy_requests_in_subtree == other.num_copy_requests_in_subtree && |
| 460 transform_id == other.transform_id && clip_id == other.clip_id; | 461 transform_id == other.transform_id && clip_id == other.clip_id && |
| 462 target_id == other.target_id; |
| 461 } | 463 } |
| 462 | 464 |
| 463 void EffectNodeData::ToProtobuf(proto::TreeNode* proto) const { | 465 void EffectNodeData::ToProtobuf(proto::TreeNode* proto) const { |
| 464 DCHECK(!proto->has_effect_node_data()); | 466 DCHECK(!proto->has_effect_node_data()); |
| 465 proto::EffectNodeData* data = proto->mutable_effect_node_data(); | 467 proto::EffectNodeData* data = proto->mutable_effect_node_data(); |
| 466 data->set_opacity(opacity); | 468 data->set_opacity(opacity); |
| 467 data->set_screen_space_opacity(screen_space_opacity); | 469 data->set_screen_space_opacity(screen_space_opacity); |
| 468 data->set_has_render_surface(has_render_surface); | 470 data->set_has_render_surface(has_render_surface); |
| 469 data->set_has_copy_request(has_copy_request); | 471 data->set_has_copy_request(has_copy_request); |
| 470 data->set_has_background_filters(has_background_filters); | 472 data->set_has_background_filters(has_background_filters); |
| 471 data->set_is_drawn(is_drawn); | 473 data->set_is_drawn(is_drawn); |
| 472 data->set_has_animated_opacity(has_animated_opacity); | 474 data->set_has_animated_opacity(has_animated_opacity); |
| 473 data->set_effect_changed(effect_changed); | 475 data->set_effect_changed(effect_changed); |
| 474 data->set_num_copy_requests_in_subtree(num_copy_requests_in_subtree); | 476 data->set_num_copy_requests_in_subtree(num_copy_requests_in_subtree); |
| 475 data->set_transform_id(transform_id); | 477 data->set_transform_id(transform_id); |
| 476 data->set_clip_id(clip_id); | 478 data->set_clip_id(clip_id); |
| 479 data->set_target_id(target_id); |
| 477 } | 480 } |
| 478 | 481 |
| 479 void EffectNodeData::FromProtobuf(const proto::TreeNode& proto) { | 482 void EffectNodeData::FromProtobuf(const proto::TreeNode& proto) { |
| 480 DCHECK(proto.has_effect_node_data()); | 483 DCHECK(proto.has_effect_node_data()); |
| 481 const proto::EffectNodeData& data = proto.effect_node_data(); | 484 const proto::EffectNodeData& data = proto.effect_node_data(); |
| 482 | 485 |
| 483 opacity = data.opacity(); | 486 opacity = data.opacity(); |
| 484 screen_space_opacity = data.screen_space_opacity(); | 487 screen_space_opacity = data.screen_space_opacity(); |
| 485 has_render_surface = data.has_render_surface(); | 488 has_render_surface = data.has_render_surface(); |
| 486 has_copy_request = data.has_copy_request(); | 489 has_copy_request = data.has_copy_request(); |
| 487 has_background_filters = data.has_background_filters(); | 490 has_background_filters = data.has_background_filters(); |
| 488 is_drawn = data.is_drawn(); | 491 is_drawn = data.is_drawn(); |
| 489 has_animated_opacity = data.has_animated_opacity(); | 492 has_animated_opacity = data.has_animated_opacity(); |
| 490 effect_changed = data.effect_changed(); | 493 effect_changed = data.effect_changed(); |
| 491 num_copy_requests_in_subtree = data.num_copy_requests_in_subtree(); | 494 num_copy_requests_in_subtree = data.num_copy_requests_in_subtree(); |
| 492 transform_id = data.transform_id(); | 495 transform_id = data.transform_id(); |
| 493 clip_id = data.clip_id(); | 496 clip_id = data.clip_id(); |
| 497 target_id = data.target_id(); |
| 494 } | 498 } |
| 495 | 499 |
| 496 ScrollNodeData::ScrollNodeData() | 500 ScrollNodeData::ScrollNodeData() |
| 497 : scrollable(false), | 501 : scrollable(false), |
| 498 main_thread_scrolling_reasons( | 502 main_thread_scrolling_reasons( |
| 499 MainThreadScrollingReason::kNotScrollingOnMain), | 503 MainThreadScrollingReason::kNotScrollingOnMain), |
| 500 contains_non_fast_scrollable_region(false), | 504 contains_non_fast_scrollable_region(false), |
| 501 max_scroll_offset_affected_by_page_scale(false), | 505 max_scroll_offset_affected_by_page_scale(false), |
| 502 is_inner_viewport_scroll_layer(false), | 506 is_inner_viewport_scroll_layer(false), |
| 503 is_outer_viewport_scroll_layer(false), | 507 is_outer_viewport_scroll_layer(false), |
| (...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1854 break; | 1858 break; |
| 1855 case ALL_TREES: | 1859 case ALL_TREES: |
| 1856 transform_tree.ResetChangeTracking(); | 1860 transform_tree.ResetChangeTracking(); |
| 1857 effect_tree.ResetChangeTracking(); | 1861 effect_tree.ResetChangeTracking(); |
| 1858 } | 1862 } |
| 1859 changed = false; | 1863 changed = false; |
| 1860 full_tree_damaged = false; | 1864 full_tree_damaged = false; |
| 1861 } | 1865 } |
| 1862 | 1866 |
| 1863 } // namespace cc | 1867 } // namespace cc |
| OLD | NEW |