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

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: 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 // Do *not* call this method unless you know what you are dooing. You probab ly want to call enclosingCompositingLayerForPaintInvalidation() instead. 275 // Do *not* call this method unless you know what you are dooing. You probab ly want to call enclosingCompositingLayerForPaintInvalidation() instead.
276 // If includeSelf is true, may return this. 276 // If includeSelf is true, may return this.
277 PaintLayer* enclosingLayerWithCompositedLayerMapping(IncludeSelfOrNot) const ; 277 PaintLayer* enclosingLayerWithCompositedLayerMapping(IncludeSelfOrNot) const ;
278 278
279 // Returns the enclosing layer root into which this layer paints, inclusive of this one. Note that the enclosing layer may or may not have its own 279 // Returns the enclosing layer root into which this layer paints, inclusive of this one. Note that the enclosing layer may or may not have its own
280 // GraphicsLayer backing, but is nevertheless the root for a call to the Lay er::paint*() methods. 280 // GraphicsLayer backing, but is nevertheless the root for a call to the Lay er::paint*() methods.
281 PaintLayer* enclosingLayerForPaintInvalidation() const; 281 PaintLayer* enclosingLayerForPaintInvalidation() const;
282 282
283 PaintLayer* enclosingLayerForPaintInvalidationCrossingFrameBoundaries() cons t; 283 PaintLayer* enclosingLayerForPaintInvalidationCrossingFrameBoundaries() cons t;
284 284
285 PaintLayer* enclosingSelfPaintingLayer() const;
286
285 bool hasAncestorWithFilterOutsets() const; 287 bool hasAncestorWithFilterOutsets() const;
286 288
287 bool canUseConvertToLayerCoords() const 289 bool canUseConvertToLayerCoords() const
288 { 290 {
289 // These LayoutObjects have an impact on their layers without the layout Objects knowing about it. 291 // These LayoutObjects have an impact on their layers without the layout Objects knowing about it.
290 return !layoutObject()->hasTransformRelatedProperty() && !layoutObject() ->isSVGRoot(); 292 return !layoutObject()->hasTransformRelatedProperty() && !layoutObject() ->isSVGRoot();
291 } 293 }
292 294
293 void convertToLayerCoords(const PaintLayer* ancestorLayer, LayoutPoint&) con st; 295 void convertToLayerCoords(const PaintLayer* ancestorLayer, LayoutPoint&) con st;
294 void convertToLayerCoords(const PaintLayer* ancestorLayer, LayoutRect&) cons t; 296 void convertToLayerCoords(const PaintLayer* ancestorLayer, LayoutRect&) cons t;
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 616
615 ClipRects* previousPaintingClipRects() const { return m_previousPaintingClip Rects.get(); } 617 ClipRects* previousPaintingClipRects() const { return m_previousPaintingClip Rects.get(); }
616 void setPreviousPaintingClipRects(ClipRects* clipRects) { m_previousPainting ClipRects = clipRects; } 618 void setPreviousPaintingClipRects(ClipRects* clipRects) { m_previousPainting ClipRects = clipRects; }
617 619
618 LayoutRect previousPaintDirtyRect() const { return m_previousPaintDirtyRect; } 620 LayoutRect previousPaintDirtyRect() const { return m_previousPaintDirtyRect; }
619 void setPreviousPaintDirtyRect(const LayoutRect& rect) { m_previousPaintDirt yRect = rect; } 621 void setPreviousPaintDirtyRect(const LayoutRect& rect) { m_previousPaintDirt yRect = rect; }
620 622
621 PaintLayerPainter::PaintResult previousPaintResult() const { return static_c ast<PaintLayerPainter::PaintResult>(m_previousPaintResult); } 623 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)); } 624 void setPreviousPaintResult(PaintLayerPainter::PaintResult result) { m_previ ousPaintResult = static_cast<unsigned>(result); ASSERT(m_previousPaintResult == static_cast<unsigned>(result)); }
623 625
626 bool needsPaintPhaseChildOutlines() const { return m_needsPaintPhaseChildOut lines; }
627 void setNeedsPaintPhaseChildOutlines() { ASSERT(isSelfPaintingLayer()); m_ne edsPaintPhaseChildOutlines = true; }
628 void clearNeedsPaintPhaseChildOutlines() { ASSERT(isSelfPaintingLayer()); m_ needsPaintPhaseChildOutlines = false; }
629
624 PaintTiming* paintTiming(); 630 PaintTiming* paintTiming();
625 631
626 private: 632 private:
627 // Bounding box in the coordinates of this layer. 633 // Bounding box in the coordinates of this layer.
628 LayoutRect logicalBoundingBox() const; 634 LayoutRect logicalBoundingBox() const;
629 635
630 bool hasOverflowControls() const; 636 bool hasOverflowControls() const;
631 637
632 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 638 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
633 639
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 // Should be for stacking contexts having unisolated blending descendants. 752 // Should be for stacking contexts having unisolated blending descendants.
747 unsigned m_shouldIsolateCompositedDescendants : 1; 753 unsigned m_shouldIsolateCompositedDescendants : 1;
748 754
749 // True if this layout layer just lost its grouped mapping due to the Compos itedLayerMapping being destroyed, 755 // 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. 756 // and we don't yet know to what graphics layer this Layer will be assigned.
751 unsigned m_lostGroupedMapping : 1; 757 unsigned m_lostGroupedMapping : 1;
752 758
753 unsigned m_needsRepaint : 1; 759 unsigned m_needsRepaint : 1;
754 unsigned m_previousPaintResult : 1; // PaintLayerPainter::PaintResult 760 unsigned m_previousPaintResult : 1; // PaintLayerPainter::PaintResult
755 761
762 unsigned m_needsPaintPhaseChildOutlines : 1;
763
756 LayoutBoxModelObject* m_layoutObject; 764 LayoutBoxModelObject* m_layoutObject;
757 765
758 PaintLayer* m_parent; 766 PaintLayer* m_parent;
759 PaintLayer* m_previous; 767 PaintLayer* m_previous;
760 PaintLayer* m_next; 768 PaintLayer* m_next;
761 PaintLayer* m_first; 769 PaintLayer* m_first;
762 PaintLayer* m_last; 770 PaintLayer* m_last;
763 771
764 // Our current relative position offset. 772 // Our current relative position offset.
765 LayoutSize m_offsetForInFlowPosition; 773 LayoutSize m_offsetForInFlowPosition;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 827
820 } // namespace blink 828 } // namespace blink
821 829
822 #ifndef NDEBUG 830 #ifndef NDEBUG
823 // Outside the WebCore namespace for ease of invocation from gdb. 831 // Outside the WebCore namespace for ease of invocation from gdb.
824 void showLayerTree(const blink::PaintLayer*); 832 void showLayerTree(const blink::PaintLayer*);
825 void showLayerTree(const blink::LayoutObject*); 833 void showLayerTree(const blink::LayoutObject*);
826 #endif 834 #endif
827 835
828 #endif // Layer_h 836 #endif // Layer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698