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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.h

Issue 2810503002: Only store previous clip rects for PaintLayers that support subsequences. (Closed)
Patch Set: none Created 3 years, 8 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 /* 1 /*
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 ScrollingCoordinator* GetScrollingCoordinator(); 577 ScrollingCoordinator* GetScrollingCoordinator();
578 578
579 // Returns true if the element or any ancestor is transformed. 579 // Returns true if the element or any ancestor is transformed.
580 bool CompositesWithTransform() const; 580 bool CompositesWithTransform() const;
581 581
582 // Returns true if the element or any ancestor has non 1 opacity. 582 // Returns true if the element or any ancestor has non 1 opacity.
583 bool CompositesWithOpacity() const; 583 bool CompositesWithOpacity() const;
584 584
585 bool PaintsWithTransform(GlobalPaintFlags) const; 585 bool PaintsWithTransform(GlobalPaintFlags) const;
586 586
587 bool SupportsSubsequenceCaching() const;
588
587 // Returns true if background phase is painted opaque in the given rect. 589 // Returns true if background phase is painted opaque in the given rect.
588 // The query rect is given in local coordinates. 590 // The query rect is given in local coordinates.
589 bool BackgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const; 591 bool BackgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const;
590 592
591 bool ContainsDirtyOverlayScrollbars() const { 593 bool ContainsDirtyOverlayScrollbars() const {
592 return contains_dirty_overlay_scrollbars_; 594 return contains_dirty_overlay_scrollbars_;
593 } 595 }
594 void SetContainsDirtyOverlayScrollbars(bool dirty_scrollbars) { 596 void SetContainsDirtyOverlayScrollbars(bool dirty_scrollbars) {
595 contains_dirty_overlay_scrollbars_ = dirty_scrollbars; 597 contains_dirty_overlay_scrollbars_ = dirty_scrollbars;
596 } 598 }
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 : nullptr; 791 : nullptr;
790 } 792 }
791 bool HasAncestorWithClipPath() const { 793 bool HasAncestorWithClipPath() const {
792 DCHECK(!needs_ancestor_dependent_compositing_inputs_update_); 794 DCHECK(!needs_ancestor_dependent_compositing_inputs_update_);
793 return has_ancestor_with_clip_path_; 795 return has_ancestor_with_clip_path_;
794 } 796 }
795 bool HasDescendantWithClipPath() const { 797 bool HasDescendantWithClipPath() const {
796 DCHECK(!needs_descendant_dependent_flags_update_); 798 DCHECK(!needs_descendant_dependent_flags_update_);
797 return has_descendant_with_clip_path_; 799 return has_descendant_with_clip_path_;
798 } 800 }
801 bool HasDescendantThatSupportsSubsequenceCaching() const {
802 DCHECK(!needs_descendant_dependent_flags_update_);
803 return has_descendant_that_supports_subsequence_caching_;
804 }
799 805
800 // Returns true if there is a descendant with blend-mode that is 806 // Returns true if there is a descendant with blend-mode that is
801 // not contained within another enclosing stacking context other 807 // not contained within another enclosing stacking context other
802 // than the stacking context blend-mode creates, or the stacking 808 // than the stacking context blend-mode creates, or the stacking
803 // context this PaintLayer might create. This is needed because 809 // context this PaintLayer might create. This is needed because
804 // blend-mode content needs to blend with the containing stacking 810 // blend-mode content needs to blend with the containing stacking
805 // context's painted output, but not the content in any grandparent 811 // context's painted output, but not the content in any grandparent
806 // stacking contexts. 812 // stacking contexts.
807 bool HasNonIsolatedDescendantWithBlendMode() const; 813 bool HasNonIsolatedDescendantWithBlendMode() const;
808 814
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 void SetPreviousScrollOffsetAccumulationForPainting(const IntSize& s) { 927 void SetPreviousScrollOffsetAccumulationForPainting(const IntSize& s) {
922 previous_scroll_offset_accumulation_for_painting_ = s; 928 previous_scroll_offset_accumulation_for_painting_ = s;
923 } 929 }
924 930
925 ClipRects* PreviousPaintingClipRects() const { 931 ClipRects* PreviousPaintingClipRects() const {
926 return previous_painting_clip_rects_.Get(); 932 return previous_painting_clip_rects_.Get();
927 } 933 }
928 void SetPreviousPaintingClipRects(ClipRects& clip_rects) { 934 void SetPreviousPaintingClipRects(ClipRects& clip_rects) {
929 previous_painting_clip_rects_ = &clip_rects; 935 previous_painting_clip_rects_ = &clip_rects;
930 } 936 }
937 void ClearPreviousPaintingClipRects() {
938 previous_painting_clip_rects_.Clear();
939 }
931 940
932 LayoutRect PreviousPaintDirtyRect() const { 941 LayoutRect PreviousPaintDirtyRect() const {
933 return previous_paint_dirty_rect_; 942 return previous_paint_dirty_rect_;
934 } 943 }
935 void SetPreviousPaintDirtyRect(const LayoutRect& rect) { 944 void SetPreviousPaintDirtyRect(const LayoutRect& rect) {
936 previous_paint_dirty_rect_ = rect; 945 previous_paint_dirty_rect_ = rect;
937 } 946 }
938 947
939 PaintResult PreviousPaintResult() const { 948 PaintResult PreviousPaintResult() const {
940 return static_cast<PaintResult>(previous_paint_result_); 949 return static_cast<PaintResult>(previous_paint_result_);
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 unsigned needs_paint_phase_float_ : 1; 1223 unsigned needs_paint_phase_float_ : 1;
1215 unsigned previous_paint_phase_float_was_empty_ : 1; 1224 unsigned previous_paint_phase_float_was_empty_ : 1;
1216 unsigned needs_paint_phase_descendant_block_backgrounds_ : 1; 1225 unsigned needs_paint_phase_descendant_block_backgrounds_ : 1;
1217 unsigned previous_paint_phase_descendant_block_backgrounds_was_empty_ : 1; 1226 unsigned previous_paint_phase_descendant_block_backgrounds_was_empty_ : 1;
1218 1227
1219 // These bitfields are part of ancestor/descendant dependent compositing 1228 // These bitfields are part of ancestor/descendant dependent compositing
1220 // inputs. 1229 // inputs.
1221 unsigned has_descendant_with_clip_path_ : 1; 1230 unsigned has_descendant_with_clip_path_ : 1;
1222 unsigned has_non_isolated_descendant_with_blend_mode_ : 1; 1231 unsigned has_non_isolated_descendant_with_blend_mode_ : 1;
1223 unsigned has_ancestor_with_clip_path_ : 1; 1232 unsigned has_ancestor_with_clip_path_ : 1;
1233 unsigned has_descendant_that_supports_subsequence_caching_ : 1;
1224 1234
1225 unsigned self_painting_status_changed_ : 1; 1235 unsigned self_painting_status_changed_ : 1;
1226 1236
1227 LayoutBoxModelObject& layout_object_; 1237 LayoutBoxModelObject& layout_object_;
1228 1238
1229 PaintLayer* parent_; 1239 PaintLayer* parent_;
1230 PaintLayer* previous_; 1240 PaintLayer* previous_;
1231 PaintLayer* next_; 1241 PaintLayer* next_;
1232 PaintLayer* first_; 1242 PaintLayer* first_;
1233 PaintLayer* last_; 1243 PaintLayer* last_;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 1282
1273 } // namespace blink 1283 } // namespace blink
1274 1284
1275 #ifndef NDEBUG 1285 #ifndef NDEBUG
1276 // Outside the WebCore namespace for ease of invocation from gdb. 1286 // Outside the WebCore namespace for ease of invocation from gdb.
1277 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); 1287 CORE_EXPORT void showLayerTree(const blink::PaintLayer*);
1278 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); 1288 CORE_EXPORT void showLayerTree(const blink::LayoutObject*);
1279 #endif 1289 #endif
1280 1290
1281 #endif // Layer_h 1291 #endif // Layer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698