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

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

Issue 2009353003: 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, 6 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 PaintLayer* removeChild(PaintLayer*); 232 PaintLayer* removeChild(PaintLayer*);
233 233
234 void removeOnlyThisLayerAfterStyleChange(); 234 void removeOnlyThisLayerAfterStyleChange();
235 void insertOnlyThisLayerAfterStyleChange(); 235 void insertOnlyThisLayerAfterStyleChange();
236 236
237 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle); 237 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle);
238 238
239 // FIXME: Many people call this function while it has out-of-date informatio n. 239 // FIXME: Many people call this function while it has out-of-date informatio n.
240 bool isSelfPaintingLayer() const { return m_isSelfPaintingLayer; } 240 bool isSelfPaintingLayer() const { return m_isSelfPaintingLayer; }
241 241
242 // PaintLayers which represent LayoutParts may become self-painting due to b eing composited.
243 // If this is the case, this method returns true.
244 bool isSelfPaintingOnlyBecauseIsCompositedPart() const;
245
242 bool isTransparent() const { return layoutObject()->isTransparent() || layou tObject()->style()->hasBlendMode() || layoutObject()->hasMask(); } 246 bool isTransparent() const { return layoutObject()->isTransparent() || layou tObject()->style()->hasBlendMode() || layoutObject()->hasMask(); }
243 247
244 bool isReflection() const { return layoutObject()->isReplica(); } 248 bool isReflection() const { return layoutObject()->isReplica(); }
245 PaintLayerReflectionInfo* reflectionInfo() { return m_rareData ? m_rareData- >reflectionInfo.get() : nullptr; } 249 PaintLayerReflectionInfo* reflectionInfo() { return m_rareData ? m_rareData- >reflectionInfo.get() : nullptr; }
246 const PaintLayerReflectionInfo* reflectionInfo() const { return const_cast<P aintLayer*>(this)->reflectionInfo(); } 250 const PaintLayerReflectionInfo* reflectionInfo() const { return const_cast<P aintLayer*>(this)->reflectionInfo(); }
247 251
248 const PaintLayer* root() const 252 const PaintLayer* root() const
249 { 253 {
250 const PaintLayer* curr = this; 254 const PaintLayer* curr = this;
251 while (curr->parent()) 255 while (curr->parent())
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 return *m_rareData; 781 return *m_rareData;
778 } 782 }
779 783
780 void mergeNeedsPaintPhaseFlagsFrom(const PaintLayer& layer) 784 void mergeNeedsPaintPhaseFlagsFrom(const PaintLayer& layer)
781 { 785 {
782 m_needsPaintPhaseDescendantOutlines |= layer.m_needsPaintPhaseDescendant Outlines; 786 m_needsPaintPhaseDescendantOutlines |= layer.m_needsPaintPhaseDescendant Outlines;
783 m_needsPaintPhaseFloat |= layer.m_needsPaintPhaseFloat; 787 m_needsPaintPhaseFloat |= layer.m_needsPaintPhaseFloat;
784 m_needsPaintPhaseDescendantBlockBackgrounds |= layer.m_needsPaintPhaseDe scendantBlockBackgrounds; 788 m_needsPaintPhaseDescendantBlockBackgrounds |= layer.m_needsPaintPhaseDe scendantBlockBackgrounds;
785 } 789 }
786 790
791 bool isSelfPaintingLayerForIntrinsicOrScrollingReasons() const;
792
787 // Self-painting layer is an optimization where we avoid the heavy Layer pai nting 793 // Self-painting layer is an optimization where we avoid the heavy Layer pai nting
788 // machinery for a Layer allocated only to handle the overflow clip case. 794 // machinery for a Layer allocated only to handle the overflow clip case.
789 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov erflow-only concept. 795 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov erflow-only concept.
790 unsigned m_isSelfPaintingLayer : 1; 796 unsigned m_isSelfPaintingLayer : 1;
791 797
792 // If have no self-painting descendants, we don't have to walk our children during painting. This can lead to 798 // If have no self-painting descendants, we don't have to walk our children during painting. This can lead to
793 // significant savings, especially if the tree has lots of non-self-painting layers grouped together (e.g. table cells). 799 // significant savings, especially if the tree has lots of non-self-painting layers grouped together (e.g. table cells).
794 mutable unsigned m_hasSelfPaintingLayerDescendant : 1; 800 mutable unsigned m_hasSelfPaintingLayerDescendant : 1;
795 mutable unsigned m_hasSelfPaintingLayerDescendantDirty : 1; 801 mutable unsigned m_hasSelfPaintingLayerDescendantDirty : 1;
796 802
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 894
889 } // namespace blink 895 } // namespace blink
890 896
891 #ifndef NDEBUG 897 #ifndef NDEBUG
892 // Outside the WebCore namespace for ease of invocation from gdb. 898 // Outside the WebCore namespace for ease of invocation from gdb.
893 void showLayerTree(const blink::PaintLayer*); 899 void showLayerTree(const blink::PaintLayer*);
894 void showLayerTree(const blink::LayoutObject*); 900 void showLayerTree(const blink::LayoutObject*);
895 #endif 901 #endif
896 902
897 #endif // Layer_h 903 #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