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

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

Issue 2164813002: Revert "Add a hack to set shouldPaint to true for force-composited iframes." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 PaintLayer* removeChild(PaintLayer*); 233 PaintLayer* removeChild(PaintLayer*);
234 234
235 void removeOnlyThisLayerAfterStyleChange(); 235 void removeOnlyThisLayerAfterStyleChange();
236 void insertOnlyThisLayerAfterStyleChange(); 236 void insertOnlyThisLayerAfterStyleChange();
237 237
238 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle); 238 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle);
239 239
240 // FIXME: Many people call this function while it has out-of-date informatio n. 240 // FIXME: Many people call this function while it has out-of-date informatio n.
241 bool isSelfPaintingLayer() const { return m_isSelfPaintingLayer; } 241 bool isSelfPaintingLayer() const { return m_isSelfPaintingLayer; }
242 242
243 // PaintLayers which represent LayoutParts may become self-painting due to b eing composited.
244 // If this is the case, this method returns true.
245 bool isSelfPaintingOnlyBecauseIsCompositedPart() const;
246
247 bool isTransparent() const { return layoutObject()->isTransparent() || layou tObject()->style()->hasBlendMode() || layoutObject()->hasMask(); } 243 bool isTransparent() const { return layoutObject()->isTransparent() || layou tObject()->style()->hasBlendMode() || layoutObject()->hasMask(); }
248 244
249 bool isReflection() const { return layoutObject()->isReplica(); } 245 bool isReflection() const { return layoutObject()->isReplica(); }
250 PaintLayerReflectionInfo* reflectionInfo() { return m_rareData ? m_rareData- >reflectionInfo.get() : nullptr; } 246 PaintLayerReflectionInfo* reflectionInfo() { return m_rareData ? m_rareData- >reflectionInfo.get() : nullptr; }
251 const PaintLayerReflectionInfo* reflectionInfo() const { return const_cast<P aintLayer*>(this)->reflectionInfo(); } 247 const PaintLayerReflectionInfo* reflectionInfo() const { return const_cast<P aintLayer*>(this)->reflectionInfo(); }
252 248
253 const PaintLayer* root() const 249 const PaintLayer* root() const
254 { 250 {
255 const PaintLayer* curr = this; 251 const PaintLayer* curr = this;
256 while (curr->parent()) 252 while (curr->parent())
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 return *m_rareData; 782 return *m_rareData;
787 } 783 }
788 784
789 void mergeNeedsPaintPhaseFlagsFrom(const PaintLayer& layer) 785 void mergeNeedsPaintPhaseFlagsFrom(const PaintLayer& layer)
790 { 786 {
791 m_needsPaintPhaseDescendantOutlines |= layer.m_needsPaintPhaseDescendant Outlines; 787 m_needsPaintPhaseDescendantOutlines |= layer.m_needsPaintPhaseDescendant Outlines;
792 m_needsPaintPhaseFloat |= layer.m_needsPaintPhaseFloat; 788 m_needsPaintPhaseFloat |= layer.m_needsPaintPhaseFloat;
793 m_needsPaintPhaseDescendantBlockBackgrounds |= layer.m_needsPaintPhaseDe scendantBlockBackgrounds; 789 m_needsPaintPhaseDescendantBlockBackgrounds |= layer.m_needsPaintPhaseDe scendantBlockBackgrounds;
794 } 790 }
795 791
796 bool isSelfPaintingLayerForIntrinsicOrScrollingReasons() const;
797
798 bool shouldFragmentCompositedBounds(const PaintLayer* compositingLayer) cons t; 792 bool shouldFragmentCompositedBounds(const PaintLayer* compositingLayer) cons t;
799 793
800 // Self-painting layer is an optimization where we avoid the heavy Layer pai nting 794 // Self-painting layer is an optimization where we avoid the heavy Layer pai nting
801 // machinery for a Layer allocated only to handle the overflow clip case. 795 // machinery for a Layer allocated only to handle the overflow clip case.
802 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov erflow-only concept. 796 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov erflow-only concept.
803 unsigned m_isSelfPaintingLayer : 1; 797 unsigned m_isSelfPaintingLayer : 1;
804 798
805 // If have no self-painting descendants, we don't have to walk our children during painting. This can lead to 799 // If have no self-painting descendants, we don't have to walk our children during painting. This can lead to
806 // significant savings, especially if the tree has lots of non-self-painting layers grouped together (e.g. table cells). 800 // significant savings, especially if the tree has lots of non-self-painting layers grouped together (e.g. table cells).
807 mutable unsigned m_hasSelfPaintingLayerDescendant : 1; 801 mutable unsigned m_hasSelfPaintingLayerDescendant : 1;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 891
898 } // namespace blink 892 } // namespace blink
899 893
900 #ifndef NDEBUG 894 #ifndef NDEBUG
901 // Outside the WebCore namespace for ease of invocation from gdb. 895 // Outside the WebCore namespace for ease of invocation from gdb.
902 void showLayerTree(const blink::PaintLayer*); 896 void showLayerTree(const blink::PaintLayer*);
903 void showLayerTree(const blink::LayoutObject*); 897 void showLayerTree(const blink::LayoutObject*);
904 #endif 898 #endif
905 899
906 #endif // Layer_h 900 #endif // Layer_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BlockFlowPainter.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698