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

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

Issue 1973083002: Use element id's for animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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"
21 #include "cc/animation/target_property.h" 22 #include "cc/animation/target_property.h"
22 #include "cc/base/cc_export.h" 23 #include "cc/base/cc_export.h"
23 #include "cc/base/region.h" 24 #include "cc/base/region.h"
24 #include "cc/base/synced_property.h" 25 #include "cc/base/synced_property.h"
25 #include "cc/input/input_handler.h" 26 #include "cc/input/input_handler.h"
26 #include "cc/layers/draw_properties.h" 27 #include "cc/layers/draw_properties.h"
27 #include "cc/layers/layer_collections.h" 28 #include "cc/layers/layer_collections.h"
28 #include "cc/layers/layer_impl_test_properties.h" 29 #include "cc/layers/layer_impl_test_properties.h"
29 #include "cc/layers/layer_position_constraint.h" 30 #include "cc/layers/layer_position_constraint.h"
30 #include "cc/layers/performance_properties.h" 31 #include "cc/layers/performance_properties.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 void SetMasksToBounds(bool masks_to_bounds); 198 void SetMasksToBounds(bool masks_to_bounds);
198 bool masks_to_bounds() const { return masks_to_bounds_; } 199 bool masks_to_bounds() const { return masks_to_bounds_; }
199 200
200 void SetContentsOpaque(bool opaque); 201 void SetContentsOpaque(bool opaque);
201 bool contents_opaque() const { return contents_opaque_; } 202 bool contents_opaque() const { return contents_opaque_; }
202 203
203 float Opacity() const; 204 float Opacity() const;
204 bool OpacityIsAnimating() const; 205 bool OpacityIsAnimating() const;
205 bool HasPotentiallyRunningOpacityAnimation() const; 206 bool HasPotentiallyRunningOpacityAnimation() const;
206 207
207 void SetElementId(uint64_t element_id); 208 void SetElementId(ElementId element_id);
208 uint64_t element_id() const { return element_id_; } 209 ElementId element_id() const { return element_id_; }
209 210
210 void SetMutableProperties(uint32_t properties); 211 void SetMutableProperties(uint32_t properties);
211 uint32_t mutable_properties() const { return mutable_properties_; } 212 uint32_t mutable_properties() const { return mutable_properties_; }
212 213
213 void SetBlendMode(SkXfermode::Mode); 214 void SetBlendMode(SkXfermode::Mode);
214 SkXfermode::Mode blend_mode() const { return blend_mode_; } 215 SkXfermode::Mode blend_mode() const { return blend_mode_; }
215 void set_draw_blend_mode(SkXfermode::Mode blend_mode) { 216 void set_draw_blend_mode(SkXfermode::Mode blend_mode) {
216 draw_blend_mode_ = blend_mode; 217 draw_blend_mode_ = blend_mode;
217 } 218 }
218 SkXfermode::Mode draw_blend_mode() const { return draw_blend_mode_; } 219 SkXfermode::Mode draw_blend_mode() const { return draw_blend_mode_; }
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 friend class TreeSynchronizer; 558 friend class TreeSynchronizer;
558 559
559 // Layers that share a sorting context id will be sorted together in 3d 560 // Layers that share a sorting context id will be sorted together in 3d
560 // space. 0 is a special value that means this layer will not be sorted and 561 // space. 0 is a special value that means this layer will not be sorted and
561 // will be drawn in paint order. 562 // will be drawn in paint order.
562 int sorting_context_id_; 563 int sorting_context_id_;
563 564
564 DrawMode current_draw_mode_; 565 DrawMode current_draw_mode_;
565 566
566 private: 567 private:
567 uint64_t element_id_; 568 ElementId element_id_;
568 uint32_t mutable_properties_; 569 uint32_t mutable_properties_;
569 // Rect indicating what was repainted/updated during update. 570 // Rect indicating what was repainted/updated during update.
570 // Note that plugin layers bypass this and leave it empty. 571 // Note that plugin layers bypass this and leave it empty.
571 // This is in the layer's space. 572 // This is in the layer's space.
572 gfx::Rect update_rect_; 573 gfx::Rect update_rect_;
573 574
574 // Denotes an area that is damaged and needs redraw. This is in the layer's 575 // Denotes an area that is damaged and needs redraw. This is in the layer's
575 // space. 576 // space.
576 gfx::Rect damage_rect_; 577 gfx::Rect damage_rect_;
577 578
(...skipping 10 matching lines...) Expand all
588 bool scrolls_drawn_descendant_ : 1; 589 bool scrolls_drawn_descendant_ : 1;
589 bool has_will_change_transform_hint_ : 1; 590 bool has_will_change_transform_hint_ : 1;
590 bool needs_push_properties_ : 1; 591 bool needs_push_properties_ : 1;
591 592
592 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 593 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
593 }; 594 };
594 595
595 } // namespace cc 596 } // namespace cc
596 597
597 #endif // CC_LAYERS_LAYER_IMPL_H_ 598 #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