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

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

Issue 474783002: HUD: Show first paint invalidation in red (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update only when needed Created 6 years, 4 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 | Annotate | Revision Log
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
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "cc/animation/animation_delegate.h" 14 #include "cc/animation/animation_delegate.h"
15 #include "cc/animation/layer_animation_controller.h" 15 #include "cc/animation/layer_animation_controller.h"
16 #include "cc/animation/layer_animation_value_observer.h" 16 #include "cc/animation/layer_animation_value_observer.h"
17 #include "cc/animation/layer_animation_value_provider.h" 17 #include "cc/animation/layer_animation_value_provider.h"
18 #include "cc/base/cc_export.h" 18 #include "cc/base/cc_export.h"
19 #include "cc/base/region.h" 19 #include "cc/base/region.h"
20 #include "cc/base/scoped_ptr_vector.h" 20 #include "cc/base/scoped_ptr_vector.h"
21 #include "cc/input/input_handler.h" 21 #include "cc/input/input_handler.h"
22 #include "cc/layers/draw_properties.h" 22 #include "cc/layers/draw_properties.h"
23 #include "cc/layers/layer_client.h"
23 #include "cc/layers/layer_lists.h" 24 #include "cc/layers/layer_lists.h"
24 #include "cc/layers/layer_position_constraint.h" 25 #include "cc/layers/layer_position_constraint.h"
25 #include "cc/layers/render_surface_impl.h" 26 #include "cc/layers/render_surface_impl.h"
26 #include "cc/output/filter_operations.h" 27 #include "cc/output/filter_operations.h"
27 #include "cc/quads/shared_quad_state.h" 28 #include "cc/quads/shared_quad_state.h"
28 #include "cc/resources/resource_provider.h" 29 #include "cc/resources/resource_provider.h"
29 #include "skia/ext/refptr.h" 30 #include "skia/ext/refptr.h"
30 #include "third_party/skia/include/core/SkColor.h" 31 #include "third_party/skia/include/core/SkColor.h"
31 #include "third_party/skia/include/core/SkImageFilter.h" 32 #include "third_party/skia/include/core/SkImageFilter.h"
32 #include "third_party/skia/include/core/SkPicture.h" 33 #include "third_party/skia/include/core/SkPicture.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 const gfx::Transform& transform() const { return transform_; } 463 const gfx::Transform& transform() const { return transform_; }
463 bool TransformIsAnimating() const; 464 bool TransformIsAnimating() const;
464 bool TransformIsAnimatingOnImplOnly() const; 465 bool TransformIsAnimatingOnImplOnly() const;
465 void SetTransformAndInvertibility(const gfx::Transform& transform, 466 void SetTransformAndInvertibility(const gfx::Transform& transform,
466 bool transform_is_invertible); 467 bool transform_is_invertible);
467 bool transform_is_invertible() const { return transform_is_invertible_; } 468 bool transform_is_invertible() const { return transform_is_invertible_; }
468 469
469 // Note this rect is in layer space (not content space). 470 // Note this rect is in layer space (not content space).
470 void SetUpdateRect(const gfx::RectF& update_rect); 471 void SetUpdateRect(const gfx::RectF& update_rect);
471 472
473 bool includes_first_paint_invalidation() const {
474 return includes_first_paint_invalidation_;
475 }
476 void SetIncludesFirstPaintInvalidation(bool b) {
477 includes_first_paint_invalidation_ = b;
478 }
479
472 const gfx::RectF& update_rect() const { return update_rect_; } 480 const gfx::RectF& update_rect() const { return update_rect_; }
473 481
474 void AddDamageRect(const gfx::RectF& damage_rect); 482 void AddDamageRect(const gfx::RectF& damage_rect);
475 483
476 const gfx::RectF& damage_rect() const { return damage_rect_; } 484 const gfx::RectF& damage_rect() const { return damage_rect_; }
477 485
478 virtual base::DictionaryValue* LayerTreeAsJson() const; 486 virtual base::DictionaryValue* LayerTreeAsJson() const;
479 487
480 void SetStackingOrderChanged(bool stacking_order_changed); 488 void SetStackingOrderChanged(bool stacking_order_changed);
481 489
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 return needs_push_properties() || descendant_needs_push_properties(); 542 return needs_push_properties() || descendant_needs_push_properties();
535 } 543 }
536 544
537 bool needs_push_properties() const { return needs_push_properties_; } 545 bool needs_push_properties() const { return needs_push_properties_; }
538 bool descendant_needs_push_properties() const { 546 bool descendant_needs_push_properties() const {
539 return num_dependents_need_push_properties_ > 0; 547 return num_dependents_need_push_properties_ > 0;
540 } 548 }
541 549
542 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark); 550 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark);
543 551
544 virtual void SetDebugInfo( 552 virtual void SetDebugInfo(scoped_refptr<LayerDebugInfo> other);
545 scoped_refptr<base::debug::ConvertableToTraceFormat> other); 553 scoped_refptr<LayerDebugInfo> debug_info() const { return debug_info_; }
546 554
547 bool IsDrawnRenderSurfaceLayerListMember() const; 555 bool IsDrawnRenderSurfaceLayerListMember() const;
548 556
549 void Set3dSortingContextId(int id); 557 void Set3dSortingContextId(int id);
550 int sorting_context_id() { return sorting_context_id_; } 558 int sorting_context_id() { return sorting_context_id_; }
551 559
552 protected: 560 protected:
553 LayerImpl(LayerTreeImpl* layer_impl, int id); 561 LayerImpl(LayerTreeImpl* layer_impl, int id);
554 562
555 // Get the color and size of the layer's debug border. 563 // Get the color and size of the layer's debug border.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 bool draw_checkerboard_for_missing_tiles_ : 1; 637 bool draw_checkerboard_for_missing_tiles_ : 1;
630 bool draws_content_ : 1; 638 bool draws_content_ : 1;
631 bool hide_layer_and_subtree_ : 1; 639 bool hide_layer_and_subtree_ : 1;
632 bool force_render_surface_ : 1; 640 bool force_render_surface_ : 1;
633 641
634 // Cache transform_'s invertibility. 642 // Cache transform_'s invertibility.
635 bool transform_is_invertible_ : 1; 643 bool transform_is_invertible_ : 1;
636 644
637 // Set for the layer that other layers are fixed to. 645 // Set for the layer that other layers are fixed to.
638 bool is_container_for_fixed_position_layers_ : 1; 646 bool is_container_for_fixed_position_layers_ : 1;
647
648 bool includes_first_paint_invalidation_ : 1;
649
639 Region non_fast_scrollable_region_; 650 Region non_fast_scrollable_region_;
640 Region touch_event_handler_region_; 651 Region touch_event_handler_region_;
641 SkColor background_color_; 652 SkColor background_color_;
642 653
643 float opacity_; 654 float opacity_;
644 SkXfermode::Mode blend_mode_; 655 SkXfermode::Mode blend_mode_;
645 gfx::PointF position_; 656 gfx::PointF position_;
646 gfx::Transform transform_; 657 gfx::Transform transform_;
647 658
648 LayerPositionConstraint position_constraint_; 659 LayerPositionConstraint position_constraint_;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; 706 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_;
696 707
697 scoped_ptr<ScrollbarSet> scrollbars_; 708 scoped_ptr<ScrollbarSet> scrollbars_;
698 709
699 ScopedPtrVector<CopyOutputRequest> copy_requests_; 710 ScopedPtrVector<CopyOutputRequest> copy_requests_;
700 711
701 // Group of properties that need to be computed based on the layer tree 712 // Group of properties that need to be computed based on the layer tree
702 // hierarchy before layers can be drawn. 713 // hierarchy before layers can be drawn.
703 DrawProperties<LayerImpl> draw_properties_; 714 DrawProperties<LayerImpl> draw_properties_;
704 715
705 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; 716 scoped_refptr<LayerDebugInfo> debug_info_;
706 717
707 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 718 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
708 }; 719 };
709 720
710 } // namespace cc 721 } // namespace cc
711 722
712 #endif // CC_LAYERS_LAYER_IMPL_H_ 723 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698