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

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

Issue 2049063002: Revert of Use element id's for animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <memory> 12 #include <memory>
13 #include <set> 13 #include <set>
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 #include "base/logging.h" 17 #include "base/logging.h"
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "base/memory/ptr_util.h" 19 #include "base/memory/ptr_util.h"
20 #include "base/values.h" 20 #include "base/values.h"
21 #include "cc/animation/element_id.h"
22 #include "cc/animation/target_property.h" 21 #include "cc/animation/target_property.h"
23 #include "cc/base/cc_export.h" 22 #include "cc/base/cc_export.h"
24 #include "cc/base/region.h" 23 #include "cc/base/region.h"
25 #include "cc/base/synced_property.h" 24 #include "cc/base/synced_property.h"
26 #include "cc/input/input_handler.h" 25 #include "cc/input/input_handler.h"
27 #include "cc/layers/draw_properties.h" 26 #include "cc/layers/draw_properties.h"
28 #include "cc/layers/layer_collections.h" 27 #include "cc/layers/layer_collections.h"
29 #include "cc/layers/layer_impl_test_properties.h" 28 #include "cc/layers/layer_impl_test_properties.h"
30 #include "cc/layers/layer_position_constraint.h" 29 #include "cc/layers/layer_position_constraint.h"
31 #include "cc/layers/performance_properties.h" 30 #include "cc/layers/performance_properties.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 void SetMasksToBounds(bool masks_to_bounds); 228 void SetMasksToBounds(bool masks_to_bounds);
230 bool masks_to_bounds() const { return masks_to_bounds_; } 229 bool masks_to_bounds() const { return masks_to_bounds_; }
231 230
232 void SetContentsOpaque(bool opaque); 231 void SetContentsOpaque(bool opaque);
233 bool contents_opaque() const { return contents_opaque_; } 232 bool contents_opaque() const { return contents_opaque_; }
234 233
235 float Opacity() const; 234 float Opacity() const;
236 bool OpacityIsAnimating() const; 235 bool OpacityIsAnimating() const;
237 bool HasPotentiallyRunningOpacityAnimation() const; 236 bool HasPotentiallyRunningOpacityAnimation() const;
238 237
239 void SetElementId(ElementId element_id); 238 void SetElementId(uint64_t element_id);
240 ElementId element_id() const { return element_id_; } 239 uint64_t element_id() const { return element_id_; }
241 240
242 void SetMutableProperties(uint32_t properties); 241 void SetMutableProperties(uint32_t properties);
243 uint32_t mutable_properties() const { return mutable_properties_; } 242 uint32_t mutable_properties() const { return mutable_properties_; }
244 243
245 void SetBlendMode(SkXfermode::Mode); 244 void SetBlendMode(SkXfermode::Mode);
246 SkXfermode::Mode blend_mode() const { return blend_mode_; } 245 SkXfermode::Mode blend_mode() const { return blend_mode_; }
247 void set_draw_blend_mode(SkXfermode::Mode blend_mode) { 246 void set_draw_blend_mode(SkXfermode::Mode blend_mode) {
248 if (draw_blend_mode_ == blend_mode) 247 if (draw_blend_mode_ == blend_mode)
249 return; 248 return;
250 draw_blend_mode_ = blend_mode; 249 draw_blend_mode_ = blend_mode;
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 friend class TreeSynchronizer; 612 friend class TreeSynchronizer;
614 613
615 // Layers that share a sorting context id will be sorted together in 3d 614 // Layers that share a sorting context id will be sorted together in 3d
616 // space. 0 is a special value that means this layer will not be sorted and 615 // space. 0 is a special value that means this layer will not be sorted and
617 // will be drawn in paint order. 616 // will be drawn in paint order.
618 int sorting_context_id_; 617 int sorting_context_id_;
619 618
620 DrawMode current_draw_mode_; 619 DrawMode current_draw_mode_;
621 620
622 private: 621 private:
623 ElementId element_id_; 622 uint64_t element_id_;
624 uint32_t mutable_properties_; 623 uint32_t mutable_properties_;
625 // Rect indicating what was repainted/updated during update. 624 // Rect indicating what was repainted/updated during update.
626 // Note that plugin layers bypass this and leave it empty. 625 // Note that plugin layers bypass this and leave it empty.
627 // This is in the layer's space. 626 // This is in the layer's space.
628 gfx::Rect update_rect_; 627 gfx::Rect update_rect_;
629 628
630 // Denotes an area that is damaged and needs redraw. This is in the layer's 629 // Denotes an area that is damaged and needs redraw. This is in the layer's
631 // space. 630 // space.
632 gfx::Rect damage_rect_; 631 gfx::Rect damage_rect_;
633 632
634 // Group of properties that need to be computed based on the layer tree 633 // Group of properties that need to be computed based on the layer tree
635 // hierarchy before layers can be drawn. 634 // hierarchy before layers can be drawn.
636 DrawProperties draw_properties_; 635 DrawProperties draw_properties_;
637 PerformanceProperties<LayerImpl> performance_properties_; 636 PerformanceProperties<LayerImpl> performance_properties_;
638 637
639 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> 638 std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
640 owned_debug_info_; 639 owned_debug_info_;
641 base::trace_event::ConvertableToTraceFormat* debug_info_; 640 base::trace_event::ConvertableToTraceFormat* debug_info_;
642 std::unique_ptr<RenderSurfaceImpl> render_surface_; 641 std::unique_ptr<RenderSurfaceImpl> render_surface_;
643 642
644 bool scrolls_drawn_descendant_; 643 bool scrolls_drawn_descendant_;
645 bool has_will_change_transform_hint_; 644 bool has_will_change_transform_hint_;
646 645
647 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 646 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
648 }; 647 };
649 648
650 } // namespace cc 649 } // namespace cc
651 650
652 #endif // CC_LAYERS_LAYER_IMPL_H_ 651 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698