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

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

Issue 1584493002: Skip PaintPhaseDescendantOutlinesOnly if no descendent outlines in the layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 11 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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 614
615 ClipRects* previousPaintingClipRects() const { return m_previousPaintingClip Rects.get(); } 615 ClipRects* previousPaintingClipRects() const { return m_previousPaintingClip Rects.get(); }
616 void setPreviousPaintingClipRects(ClipRects* clipRects) { m_previousPainting ClipRects = clipRects; } 616 void setPreviousPaintingClipRects(ClipRects* clipRects) { m_previousPainting ClipRects = clipRects; }
617 617
618 LayoutRect previousPaintDirtyRect() const { return m_previousPaintDirtyRect; } 618 LayoutRect previousPaintDirtyRect() const { return m_previousPaintDirtyRect; }
619 void setPreviousPaintDirtyRect(const LayoutRect& rect) { m_previousPaintDirt yRect = rect; } 619 void setPreviousPaintDirtyRect(const LayoutRect& rect) { m_previousPaintDirt yRect = rect; }
620 620
621 PaintLayerPainter::PaintResult previousPaintResult() const { return static_c ast<PaintLayerPainter::PaintResult>(m_previousPaintResult); } 621 PaintLayerPainter::PaintResult previousPaintResult() const { return static_c ast<PaintLayerPainter::PaintResult>(m_previousPaintResult); }
622 void setPreviousPaintResult(PaintLayerPainter::PaintResult result) { m_previ ousPaintResult = static_cast<unsigned>(result); ASSERT(m_previousPaintResult == static_cast<unsigned>(result)); } 622 void setPreviousPaintResult(PaintLayerPainter::PaintResult result) { m_previ ousPaintResult = static_cast<unsigned>(result); ASSERT(m_previousPaintResult == static_cast<unsigned>(result)); }
623 623
624 // Used to skip PaintPhaseDescendantOutlinesOnly for layers that have never had descendant outlines.
625 // Once it's set we never clear it because it's not easy to track if all out lines have been removed.
626 bool needsPaintPhaseDescendantOutlines() const { return m_needsPaintPhaseDes cendantOutlines; }
627 void setNeedsPaintPhaseDescendantOutlines() { ASSERT(isSelfPaintingLayer()); m_needsPaintPhaseDescendantOutlines = true; }
628
624 PaintTiming* paintTiming(); 629 PaintTiming* paintTiming();
625 630
626 private: 631 private:
627 // Bounding box in the coordinates of this layer. 632 // Bounding box in the coordinates of this layer.
628 LayoutRect logicalBoundingBox() const; 633 LayoutRect logicalBoundingBox() const;
629 634
630 bool hasOverflowControls() const; 635 bool hasOverflowControls() const;
631 636
632 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 637 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
633 638
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 // Should be for stacking contexts having unisolated blending descendants. 751 // Should be for stacking contexts having unisolated blending descendants.
747 unsigned m_shouldIsolateCompositedDescendants : 1; 752 unsigned m_shouldIsolateCompositedDescendants : 1;
748 753
749 // True if this layout layer just lost its grouped mapping due to the Compos itedLayerMapping being destroyed, 754 // True if this layout layer just lost its grouped mapping due to the Compos itedLayerMapping being destroyed,
750 // and we don't yet know to what graphics layer this Layer will be assigned. 755 // and we don't yet know to what graphics layer this Layer will be assigned.
751 unsigned m_lostGroupedMapping : 1; 756 unsigned m_lostGroupedMapping : 1;
752 757
753 unsigned m_needsRepaint : 1; 758 unsigned m_needsRepaint : 1;
754 unsigned m_previousPaintResult : 1; // PaintLayerPainter::PaintResult 759 unsigned m_previousPaintResult : 1; // PaintLayerPainter::PaintResult
755 760
761 unsigned m_needsPaintPhaseDescendantOutlines : 1;
762
756 LayoutBoxModelObject* m_layoutObject; 763 LayoutBoxModelObject* m_layoutObject;
757 764
758 PaintLayer* m_parent; 765 PaintLayer* m_parent;
759 PaintLayer* m_previous; 766 PaintLayer* m_previous;
760 PaintLayer* m_next; 767 PaintLayer* m_next;
761 PaintLayer* m_first; 768 PaintLayer* m_first;
762 PaintLayer* m_last; 769 PaintLayer* m_last;
763 770
764 // Our current relative position offset. 771 // Our current relative position offset.
765 LayoutSize m_offsetForInFlowPosition; 772 LayoutSize m_offsetForInFlowPosition;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 826
820 } // namespace blink 827 } // namespace blink
821 828
822 #ifndef NDEBUG 829 #ifndef NDEBUG
823 // Outside the WebCore namespace for ease of invocation from gdb. 830 // Outside the WebCore namespace for ease of invocation from gdb.
824 void showLayerTree(const blink::PaintLayer*); 831 void showLayerTree(const blink::PaintLayer*);
825 void showLayerTree(const blink::LayoutObject*); 832 void showLayerTree(const blink::LayoutObject*);
826 #endif 833 #endif
827 834
828 #endif // Layer_h 835 #endif // Layer_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h ('k') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698