Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(723)

Side by Side Diff: cc/trees/property_tree.cc

Issue 1957533002: cc : Track opacity animation changes on effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 hidden_by_backface_visibility(false), 453 hidden_by_backface_visibility(false),
454 double_sided(false), 454 double_sided(false),
455 is_drawn(true), 455 is_drawn(true),
456 has_animated_opacity(false), 456 has_animated_opacity(false),
457 is_currently_animating_opacity(false),
457 effect_changed(false), 458 effect_changed(false),
458 num_copy_requests_in_subtree(0), 459 num_copy_requests_in_subtree(0),
459 transform_id(0), 460 transform_id(0),
460 clip_id(0), 461 clip_id(0),
461 target_id(0) {} 462 target_id(0) {}
462 463
463 EffectNodeData::EffectNodeData(const EffectNodeData& other) = default; 464 EffectNodeData::EffectNodeData(const EffectNodeData& other) = default;
464 465
465 bool EffectNodeData::operator==(const EffectNodeData& other) const { 466 bool EffectNodeData::operator==(const EffectNodeData& other) const {
466 return opacity == other.opacity && 467 return opacity == other.opacity &&
467 screen_space_opacity == other.screen_space_opacity && 468 screen_space_opacity == other.screen_space_opacity &&
468 has_render_surface == other.has_render_surface && 469 has_render_surface == other.has_render_surface &&
469 has_copy_request == other.has_copy_request && 470 has_copy_request == other.has_copy_request &&
470 has_background_filters == other.has_background_filters && 471 has_background_filters == other.has_background_filters &&
471 hidden_by_backface_visibility == other.hidden_by_backface_visibility && 472 hidden_by_backface_visibility == other.hidden_by_backface_visibility &&
472 double_sided == other.double_sided && is_drawn == other.is_drawn && 473 double_sided == other.double_sided && is_drawn == other.is_drawn &&
473 has_animated_opacity == other.has_animated_opacity && 474 has_animated_opacity == other.has_animated_opacity &&
475 is_currently_animating_opacity ==
476 other.is_currently_animating_opacity &&
474 effect_changed == other.effect_changed && 477 effect_changed == other.effect_changed &&
475 num_copy_requests_in_subtree == other.num_copy_requests_in_subtree && 478 num_copy_requests_in_subtree == other.num_copy_requests_in_subtree &&
476 transform_id == other.transform_id && clip_id == other.clip_id && 479 transform_id == other.transform_id && clip_id == other.clip_id &&
477 target_id == other.target_id; 480 target_id == other.target_id;
478 } 481 }
479 482
480 void EffectNodeData::ToProtobuf(proto::TreeNode* proto) const { 483 void EffectNodeData::ToProtobuf(proto::TreeNode* proto) const {
481 DCHECK(!proto->has_effect_node_data()); 484 DCHECK(!proto->has_effect_node_data());
482 proto::EffectNodeData* data = proto->mutable_effect_node_data(); 485 proto::EffectNodeData* data = proto->mutable_effect_node_data();
483 data->set_opacity(opacity); 486 data->set_opacity(opacity);
484 data->set_screen_space_opacity(screen_space_opacity); 487 data->set_screen_space_opacity(screen_space_opacity);
485 data->set_has_render_surface(has_render_surface); 488 data->set_has_render_surface(has_render_surface);
486 data->set_has_copy_request(has_copy_request); 489 data->set_has_copy_request(has_copy_request);
487 data->set_has_background_filters(has_background_filters); 490 data->set_has_background_filters(has_background_filters);
488 data->set_hidden_by_backface_visibility(hidden_by_backface_visibility); 491 data->set_hidden_by_backface_visibility(hidden_by_backface_visibility);
489 data->set_double_sided(double_sided); 492 data->set_double_sided(double_sided);
490 data->set_is_drawn(is_drawn); 493 data->set_is_drawn(is_drawn);
491 data->set_has_animated_opacity(has_animated_opacity); 494 data->set_has_animated_opacity(has_animated_opacity);
495 data->set_is_currently_animating_opacity(is_currently_animating_opacity);
492 data->set_effect_changed(effect_changed); 496 data->set_effect_changed(effect_changed);
493 data->set_num_copy_requests_in_subtree(num_copy_requests_in_subtree); 497 data->set_num_copy_requests_in_subtree(num_copy_requests_in_subtree);
494 data->set_transform_id(transform_id); 498 data->set_transform_id(transform_id);
495 data->set_clip_id(clip_id); 499 data->set_clip_id(clip_id);
496 data->set_target_id(target_id); 500 data->set_target_id(target_id);
497 } 501 }
498 502
499 void EffectNodeData::FromProtobuf(const proto::TreeNode& proto) { 503 void EffectNodeData::FromProtobuf(const proto::TreeNode& proto) {
500 DCHECK(proto.has_effect_node_data()); 504 DCHECK(proto.has_effect_node_data());
501 const proto::EffectNodeData& data = proto.effect_node_data(); 505 const proto::EffectNodeData& data = proto.effect_node_data();
502 506
503 opacity = data.opacity(); 507 opacity = data.opacity();
504 screen_space_opacity = data.screen_space_opacity(); 508 screen_space_opacity = data.screen_space_opacity();
505 has_render_surface = data.has_render_surface(); 509 has_render_surface = data.has_render_surface();
506 has_copy_request = data.has_copy_request(); 510 has_copy_request = data.has_copy_request();
507 has_background_filters = data.has_background_filters(); 511 has_background_filters = data.has_background_filters();
508 hidden_by_backface_visibility = data.hidden_by_backface_visibility(); 512 hidden_by_backface_visibility = data.hidden_by_backface_visibility();
509 double_sided = data.double_sided(); 513 double_sided = data.double_sided();
510 is_drawn = data.is_drawn(); 514 is_drawn = data.is_drawn();
511 has_animated_opacity = data.has_animated_opacity(); 515 has_animated_opacity = data.has_animated_opacity();
516 is_currently_animating_opacity = data.is_currently_animating_opacity();
512 effect_changed = data.effect_changed(); 517 effect_changed = data.effect_changed();
513 num_copy_requests_in_subtree = data.num_copy_requests_in_subtree(); 518 num_copy_requests_in_subtree = data.num_copy_requests_in_subtree();
514 transform_id = data.transform_id(); 519 transform_id = data.transform_id();
515 clip_id = data.clip_id(); 520 clip_id = data.clip_id();
516 target_id = data.target_id(); 521 target_id = data.target_id();
517 } 522 }
518 523
519 ScrollNodeData::ScrollNodeData() 524 ScrollNodeData::ScrollNodeData()
520 : scrollable(false), 525 : scrollable(false),
521 main_thread_scrolling_reasons( 526 main_thread_scrolling_reasons(
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1956 break; 1961 break;
1957 case ALL_TREES: 1962 case ALL_TREES:
1958 transform_tree.ResetChangeTracking(); 1963 transform_tree.ResetChangeTracking();
1959 effect_tree.ResetChangeTracking(); 1964 effect_tree.ResetChangeTracking();
1960 } 1965 }
1961 changed = false; 1966 changed = false;
1962 full_tree_damaged = false; 1967 full_tree_damaged = false;
1963 } 1968 }
1964 1969
1965 } // namespace cc 1970 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698