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

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

Issue 1405993008: compositor-worker: plumb element id and mutable properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix rebase error. Created 5 years 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 <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 310
311 void SetContentsOpaque(bool opaque); 311 void SetContentsOpaque(bool opaque);
312 bool contents_opaque() const { return contents_opaque_; } 312 bool contents_opaque() const { return contents_opaque_; }
313 313
314 void SetOpacity(float opacity); 314 void SetOpacity(float opacity);
315 float opacity() const { return opacity_; } 315 float opacity() const { return opacity_; }
316 bool OpacityIsAnimating() const; 316 bool OpacityIsAnimating() const;
317 bool HasPotentiallyRunningOpacityAnimation() const; 317 bool HasPotentiallyRunningOpacityAnimation() const;
318 bool OpacityIsAnimatingOnImplOnly() const; 318 bool OpacityIsAnimatingOnImplOnly() const;
319 319
320 void SetElementId(uint64_t element_id);
321 uint64_t element_id() const { return element_id_; }
322
323 void SetMutableProperties(uint32_t properties);
324 uint32_t mutable_properties() const { return mutable_properties_; }
325
320 void SetBlendMode(SkXfermode::Mode); 326 void SetBlendMode(SkXfermode::Mode);
321 SkXfermode::Mode blend_mode() const { return blend_mode_; } 327 SkXfermode::Mode blend_mode() const { return blend_mode_; }
322 void set_draw_blend_mode(SkXfermode::Mode blend_mode) { 328 void set_draw_blend_mode(SkXfermode::Mode blend_mode) {
323 if (draw_blend_mode_ == blend_mode) 329 if (draw_blend_mode_ == blend_mode)
324 return; 330 return;
325 draw_blend_mode_ = blend_mode; 331 draw_blend_mode_ = blend_mode;
326 SetNeedsPushProperties(); 332 SetNeedsPushProperties();
327 } 333 }
328 SkXfermode::Mode draw_blend_mode() const { return draw_blend_mode_; } 334 SkXfermode::Mode draw_blend_mode() const { return draw_blend_mode_; }
329 bool uses_default_blend_mode() const { 335 bool uses_default_blend_mode() const {
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 int num_dependents_need_push_properties_; 846 int num_dependents_need_push_properties_;
841 847
842 // Layers that share a sorting context id will be sorted together in 3d 848 // Layers that share a sorting context id will be sorted together in 3d
843 // space. 0 is a special value that means this layer will not be sorted and 849 // space. 0 is a special value that means this layer will not be sorted and
844 // will be drawn in paint order. 850 // will be drawn in paint order.
845 int sorting_context_id_; 851 int sorting_context_id_;
846 852
847 DrawMode current_draw_mode_; 853 DrawMode current_draw_mode_;
848 854
849 private: 855 private:
856 uint64_t element_id_;
857 uint32_t mutable_properties_;
850 // Rect indicating what was repainted/updated during update. 858 // Rect indicating what was repainted/updated during update.
851 // Note that plugin layers bypass this and leave it empty. 859 // Note that plugin layers bypass this and leave it empty.
852 // This is in the layer's space. 860 // This is in the layer's space.
853 gfx::Rect update_rect_; 861 gfx::Rect update_rect_;
854 862
855 // Denotes an area that is damaged and needs redraw. This is in the layer's 863 // Denotes an area that is damaged and needs redraw. This is in the layer's
856 // space. 864 // space.
857 gfx::Rect damage_rect_; 865 gfx::Rect damage_rect_;
858 866
859 // Manages animations for this layer. 867 // Manages animations for this layer.
(...skipping 18 matching lines...) Expand all
878 // If true, the layer or one of its descendants has a wheel or touch handler. 886 // If true, the layer or one of its descendants has a wheel or touch handler.
879 bool layer_or_descendant_has_input_handler_; 887 bool layer_or_descendant_has_input_handler_;
880 bool sorted_for_recursion_; 888 bool sorted_for_recursion_;
881 889
882 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 890 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
883 }; 891 };
884 892
885 } // namespace cc 893 } // namespace cc
886 894
887 #endif // CC_LAYERS_LAYER_IMPL_H_ 895 #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