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

Side by Side Diff: cc/layers/layer.h

Issue 1139573004: Reset property tree indices when layer is removed from layer tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use sequence numbers to invalidate property tree indices. Created 5 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
« no previous file with comments | « no previous file | cc/layers/layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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_LAYERS_LAYER_H_ 5 #ifndef CC_LAYERS_LAYER_H_
6 #define CC_LAYERS_LAYER_H_ 6 #define CC_LAYERS_LAYER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 } 469 }
470 void reset_needs_push_properties_for_testing() { 470 void reset_needs_push_properties_for_testing() {
471 needs_push_properties_ = false; 471 needs_push_properties_ = false;
472 } 472 }
473 473
474 virtual void RunMicroBenchmark(MicroBenchmark* benchmark); 474 virtual void RunMicroBenchmark(MicroBenchmark* benchmark);
475 475
476 void Set3dSortingContextId(int id); 476 void Set3dSortingContextId(int id);
477 int sorting_context_id() const { return sorting_context_id_; } 477 int sorting_context_id() const { return sorting_context_id_; }
478 478
479 void set_transform_tree_index(int index) { 479 void set_property_tree_sequence_number(int sequence_number) {
480 if (transform_tree_index_ == index) 480 property_tree_sequence_number_ = sequence_number;
481 return;
482 transform_tree_index_ = index;
483 SetNeedsPushProperties();
484 } 481 }
485 void set_clip_tree_index(int index) { 482
486 if (clip_tree_index_ == index) 483 void SetTransformTreeIndex(int index);
487 return; 484 int transform_tree_index() const;
488 clip_tree_index_ = index; 485
489 SetNeedsPushProperties(); 486 void SetClipTreeIndex(int index);
490 } 487 int clip_tree_index() const;
491 void set_opacity_tree_index(int index) { 488
492 if (opacity_tree_index_ == index) 489 void SetOpacityTreeIndex(int index);
493 return; 490 int opacity_tree_index() const;
494 opacity_tree_index_ = index;
495 SetNeedsPushProperties();
496 }
497 int clip_tree_index() const { return clip_tree_index_; }
498 int transform_tree_index() const { return transform_tree_index_; }
499 int opacity_tree_index() const { return opacity_tree_index_; }
500 491
501 void set_offset_to_transform_parent(gfx::Vector2dF offset) { 492 void set_offset_to_transform_parent(gfx::Vector2dF offset) {
502 if (offset_to_transform_parent_ == offset) 493 if (offset_to_transform_parent_ == offset)
503 return; 494 return;
504 offset_to_transform_parent_ = offset; 495 offset_to_transform_parent_ = offset;
505 SetNeedsPushProperties(); 496 SetNeedsPushProperties();
506 } 497 }
507 gfx::Vector2dF offset_to_transform_parent() const { 498 gfx::Vector2dF offset_to_transform_parent() const {
508 return offset_to_transform_parent_; 499 return offset_to_transform_parent_;
509 } 500 }
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 gfx::ScrollOffset scroll_offset_; 693 gfx::ScrollOffset scroll_offset_;
703 gfx::Vector2dF scroll_compensation_adjustment_; 694 gfx::Vector2dF scroll_compensation_adjustment_;
704 // This variable indicates which ancestor layer (if any) whose size, 695 // This variable indicates which ancestor layer (if any) whose size,
705 // transformed relative to this layer, defines the maximum scroll offset for 696 // transformed relative to this layer, defines the maximum scroll offset for
706 // this layer. 697 // this layer.
707 int scroll_clip_layer_id_; 698 int scroll_clip_layer_id_;
708 int num_descendants_that_draw_content_; 699 int num_descendants_that_draw_content_;
709 int transform_tree_index_; 700 int transform_tree_index_;
710 int opacity_tree_index_; 701 int opacity_tree_index_;
711 int clip_tree_index_; 702 int clip_tree_index_;
703 int property_tree_sequence_number_;
712 int num_layer_or_descendants_with_copy_request_; 704 int num_layer_or_descendants_with_copy_request_;
713 int num_layer_or_descendants_with_input_handler_; 705 int num_layer_or_descendants_with_input_handler_;
714 gfx::Vector2dF offset_to_transform_parent_; 706 gfx::Vector2dF offset_to_transform_parent_;
715 bool should_flatten_transform_from_property_tree_ : 1; 707 bool should_flatten_transform_from_property_tree_ : 1;
716 bool should_scroll_on_main_thread_ : 1; 708 bool should_scroll_on_main_thread_ : 1;
717 bool have_wheel_event_handlers_ : 1; 709 bool have_wheel_event_handlers_ : 1;
718 bool have_scroll_event_handlers_ : 1; 710 bool have_scroll_event_handlers_ : 1;
719 bool user_scrollable_horizontal_ : 1; 711 bool user_scrollable_horizontal_ : 1;
720 bool user_scrollable_vertical_ : 1; 712 bool user_scrollable_vertical_ : 1;
721 bool is_root_for_isolated_group_ : 1; 713 bool is_root_for_isolated_group_ : 1;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 766
775 std::vector<FrameTimingRequest> frame_timing_requests_; 767 std::vector<FrameTimingRequest> frame_timing_requests_;
776 bool frame_timing_requests_dirty_; 768 bool frame_timing_requests_dirty_;
777 769
778 DISALLOW_COPY_AND_ASSIGN(Layer); 770 DISALLOW_COPY_AND_ASSIGN(Layer);
779 }; 771 };
780 772
781 } // namespace cc 773 } // namespace cc
782 774
783 #endif // CC_LAYERS_LAYER_H_ 775 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698