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

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: Now plumbing rendering context IDs through WebLayerImpl 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 (draw_properties_.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 SetContextId(int id);
545 int context_id() { return draw_properties_.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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 DrawProperties<LayerImpl> draw_properties_; 691 DrawProperties<LayerImpl> draw_properties_;
691 692
692 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; 693 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_;
693 694
694 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 695 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
695 }; 696 };
696 697
697 } // namespace cc 698 } // namespace cc
698 699
699 #endif // CC_LAYERS_LAYER_IMPL_H_ 700 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698