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

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

Issue 332873005: Rendering context information added to SharedQuadState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rendering context now in Layers, removed is_3d_sorted Created 6 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
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 <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 void SetPositionConstraint(const LayerPositionConstraint& constraint) { 260 void SetPositionConstraint(const LayerPositionConstraint& constraint) {
261 position_constraint_ = constraint; 261 position_constraint_ = constraint;
262 } 262 }
263 const LayerPositionConstraint& position_constraint() const { 263 const LayerPositionConstraint& position_constraint() const {
264 return position_constraint_; 264 return position_constraint_;
265 } 265 }
266 266
267 void SetShouldFlattenTransform(bool flatten); 267 void SetShouldFlattenTransform(bool flatten);
268 bool should_flatten_transform() const { return should_flatten_transform_; } 268 bool should_flatten_transform() const { return should_flatten_transform_; }
269 269
270 void SetIs3dSorted(bool sorted); 270 bool Is3dSorted() const { return rendering_context_id_ != 0; }
271 bool is_3d_sorted() const { return is_3d_sorted_; }
272 271
273 void SetUseParentBackfaceVisibility(bool use) { 272 void SetUseParentBackfaceVisibility(bool use) {
274 use_parent_backface_visibility_ = use; 273 use_parent_backface_visibility_ = use;
275 } 274 }
276 bool use_parent_backface_visibility() const { 275 bool use_parent_backface_visibility() const {
277 return use_parent_backface_visibility_; 276 return use_parent_backface_visibility_;
278 } 277 }
279 278
280 bool ShowDebugBorders() const; 279 bool ShowDebugBorders() const;
281 280
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 return num_dependents_need_push_properties_ > 0; 534 return num_dependents_need_push_properties_ > 0;
536 } 535 }
537 536
538 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark); 537 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark);
539 538
540 virtual void SetDebugInfo( 539 virtual void SetDebugInfo(
541 scoped_refptr<base::debug::ConvertableToTraceFormat> other); 540 scoped_refptr<base::debug::ConvertableToTraceFormat> other);
542 541
543 bool IsDrawnRenderSurfaceLayerListMember() const; 542 bool IsDrawnRenderSurfaceLayerListMember() const;
544 543
544 void SetRenderingContextId(int id);
545 int rendering_context_id() { return rendering_context_id_; }
546
545 protected: 547 protected:
546 LayerImpl(LayerTreeImpl* layer_impl, int id); 548 LayerImpl(LayerTreeImpl* layer_impl, int id);
547 549
548 // Get the color and size of the layer's debug border. 550 // Get the color and size of the layer's debug border.
549 virtual void GetDebugBorderProperties(SkColor* color, float* width) const; 551 virtual void GetDebugBorderProperties(SkColor* color, float* width) const;
550 552
551 void AppendDebugBorderQuad(QuadSink* quad_sink, 553 void AppendDebugBorderQuad(QuadSink* quad_sink,
552 const SharedQuadState* shared_quad_state, 554 const SharedQuadState* shared_quad_state,
553 AppendQuadsData* append_quads_data) const; 555 AppendQuadsData* append_quads_data) const;
554 void AppendDebugBorderQuad(QuadSink* quad_sink, 556 void AppendDebugBorderQuad(QuadSink* quad_sink,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 bool draw_checkerboard_for_missing_tiles_ : 1; 624 bool draw_checkerboard_for_missing_tiles_ : 1;
623 bool draws_content_ : 1; 625 bool draws_content_ : 1;
624 bool hide_layer_and_subtree_ : 1; 626 bool hide_layer_and_subtree_ : 1;
625 bool force_render_surface_ : 1; 627 bool force_render_surface_ : 1;
626 628
627 // Cache transform_'s invertibility. 629 // Cache transform_'s invertibility.
628 bool transform_is_invertible_ : 1; 630 bool transform_is_invertible_ : 1;
629 631
630 // Set for the layer that other layers are fixed to. 632 // Set for the layer that other layers are fixed to.
631 bool is_container_for_fixed_position_layers_ : 1; 633 bool is_container_for_fixed_position_layers_ : 1;
632 bool is_3d_sorted_ : 1;
633 Region non_fast_scrollable_region_; 634 Region non_fast_scrollable_region_;
634 Region touch_event_handler_region_; 635 Region touch_event_handler_region_;
635 SkColor background_color_; 636 SkColor background_color_;
636 637
637 float opacity_; 638 float opacity_;
638 SkXfermode::Mode blend_mode_; 639 SkXfermode::Mode blend_mode_;
639 gfx::PointF position_; 640 gfx::PointF position_;
640 gfx::Transform transform_; 641 gfx::Transform transform_;
641 642
642 LayerPositionConstraint position_constraint_; 643 LayerPositionConstraint position_constraint_;
(...skipping 14 matching lines...) Expand all
657 658
658 // This flag is set when the layer needs to push properties to the active 659 // This flag is set when the layer needs to push properties to the active
659 // side. 660 // side.
660 bool needs_push_properties_; 661 bool needs_push_properties_;
661 662
662 // The number of direct children or dependent layers that need to be recursed 663 // The number of direct children or dependent layers that need to be recursed
663 // to in order for them or a descendent of them to push properties to the 664 // to in order for them or a descendent of them to push properties to the
664 // active side. 665 // active side.
665 int num_dependents_need_push_properties_; 666 int num_dependents_need_push_properties_;
666 667
668 // The rendering context ID we get from Blink, plumbed through WebLayerImpl
669 int rendering_context_id_;
670
667 DrawMode current_draw_mode_; 671 DrawMode current_draw_mode_;
668 672
669 private: 673 private:
670 // Rect indicating what was repainted/updated during update. 674 // Rect indicating what was repainted/updated during update.
671 // Note that plugin layers bypass this and leave it empty. 675 // Note that plugin layers bypass this and leave it empty.
672 // Uses layer (not content) space. 676 // Uses layer (not content) space.
673 gfx::RectF update_rect_; 677 gfx::RectF update_rect_;
674 678
675 // This rect is in layer space. 679 // This rect is in layer space.
676 gfx::RectF damage_rect_; 680 gfx::RectF damage_rect_;
(...skipping 13 matching lines...) Expand all
690 DrawProperties<LayerImpl> draw_properties_; 694 DrawProperties<LayerImpl> draw_properties_;
691 695
692 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; 696 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_;
693 697
694 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 698 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
695 }; 699 };
696 700
697 } // namespace cc 701 } // namespace cc
698 702
699 #endif // CC_LAYERS_LAYER_IMPL_H_ 703 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698