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

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: rebase 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
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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 int num_dependents_need_push_properties_; 843 int num_dependents_need_push_properties_;
838 844
839 // Layers that share a sorting context id will be sorted together in 3d 845 // Layers that share a sorting context id will be sorted together in 3d
840 // space. 0 is a special value that means this layer will not be sorted and 846 // space. 0 is a special value that means this layer will not be sorted and
841 // will be drawn in paint order. 847 // will be drawn in paint order.
842 int sorting_context_id_; 848 int sorting_context_id_;
843 849
844 DrawMode current_draw_mode_; 850 DrawMode current_draw_mode_;
845 851
846 private: 852 private:
853 uint64_t element_id_;
854 uint32_t mutable_properties_;
847 // Rect indicating what was repainted/updated during update. 855 // Rect indicating what was repainted/updated during update.
848 // Note that plugin layers bypass this and leave it empty. 856 // Note that plugin layers bypass this and leave it empty.
849 // This is in the layer's space. 857 // This is in the layer's space.
850 gfx::Rect update_rect_; 858 gfx::Rect update_rect_;
851 859
852 // Denotes an area that is damaged and needs redraw. This is in the layer's 860 // Denotes an area that is damaged and needs redraw. This is in the layer's
853 // space. 861 // space.
854 gfx::Rect damage_rect_; 862 gfx::Rect damage_rect_;
855 863
856 // Manages animations for this layer. 864 // Manages animations for this layer.
(...skipping 16 matching lines...) Expand all
873 // If true, the layer or one of its descendants has a wheel or touch handler. 881 // If true, the layer or one of its descendants has a wheel or touch handler.
874 bool layer_or_descendant_has_input_handler_; 882 bool layer_or_descendant_has_input_handler_;
875 bool sorted_for_recursion_; 883 bool sorted_for_recursion_;
876 884
877 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 885 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
878 }; 886 };
879 887
880 } // namespace cc 888 } // namespace cc
881 889
882 #endif // CC_LAYERS_LAYER_IMPL_H_ 890 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698