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

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

Issue 2604973002: Move computation of 3D descendants to the descendant-dependent flags walk. (Closed)
Patch Set: none Created 3 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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 PaintTiming* paintTiming(); 960 PaintTiming* paintTiming();
961 961
962 ClipRectsCache* clipRectsCache() const { return m_clipRectsCache.get(); } 962 ClipRectsCache* clipRectsCache() const { return m_clipRectsCache.get(); }
963 ClipRectsCache& ensureClipRectsCache() const { 963 ClipRectsCache& ensureClipRectsCache() const {
964 if (!m_clipRectsCache) 964 if (!m_clipRectsCache)
965 m_clipRectsCache = WTF::wrapUnique(new ClipRectsCache); 965 m_clipRectsCache = WTF::wrapUnique(new ClipRectsCache);
966 return *m_clipRectsCache; 966 return *m_clipRectsCache;
967 } 967 }
968 void clearClipRectsCache() const { m_clipRectsCache.reset(); } 968 void clearClipRectsCache() const { m_clipRectsCache.reset(); }
969 969
970 void dirty3DTransformedDescendantStatus();
971 // Both updates the status, and returns true if descendants of this have 3d.
972 bool update3DTransformedDescendantStatus();
973 bool has3DTransformedDescendant() const { 970 bool has3DTransformedDescendant() const {
974 DCHECK(!m_is3DTransformedDescendantDirty); 971 DCHECK(!m_needsDescendantDependentFlagsUpdate);
975 return m_has3DTransformedDescendant; 972 return m_has3DTransformedDescendant;
976 } 973 }
977 974
978 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS 975 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
979 void endShouldKeepAliveAllClientsRecursive(); 976 void endShouldKeepAliveAllClientsRecursive();
980 #endif 977 #endif
981 978
982 private: 979 private:
983 void setNeedsCompositingInputsUpdateInternal(); 980 void setNeedsCompositingInputsUpdateInternal();
984 981
982 void update3DTransformedDescendantStatus();
983
985 // Bounding box in the coordinates of this layer. 984 // Bounding box in the coordinates of this layer.
986 LayoutRect logicalBoundingBox() const; 985 LayoutRect logicalBoundingBox() const;
987 986
988 bool hasOverflowControls() const; 987 bool hasOverflowControls() const;
989 988
990 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 989 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
991 990
992 void updateLayerPositionRecursive(); 991 void updateLayerPositionRecursive();
993 992
994 void setNextSibling(PaintLayer* next) { m_next = next; } 993 void setNextSibling(PaintLayer* next) { m_next = next; }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 const unsigned m_isRootLayer : 1; 1131 const unsigned m_isRootLayer : 1;
1133 1132
1134 unsigned m_hasVisibleContent : 1; 1133 unsigned m_hasVisibleContent : 1;
1135 unsigned m_needsDescendantDependentFlagsUpdate : 1; 1134 unsigned m_needsDescendantDependentFlagsUpdate : 1;
1136 unsigned m_hasVisibleDescendant : 1; 1135 unsigned m_hasVisibleDescendant : 1;
1137 1136
1138 #if DCHECK_IS_ON() 1137 #if DCHECK_IS_ON()
1139 unsigned m_needsPositionUpdate : 1; 1138 unsigned m_needsPositionUpdate : 1;
1140 #endif 1139 #endif
1141 1140
1142 unsigned m_is3DTransformedDescendantDirty : 1;
1143 // Set on a stacking context layer that has 3D descendants anywhere 1141 // Set on a stacking context layer that has 3D descendants anywhere
1144 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing. 1142 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing.
1145 unsigned m_has3DTransformedDescendant : 1; 1143 unsigned m_has3DTransformedDescendant : 1;
1146 1144
1147 unsigned m_containsDirtyOverlayScrollbars : 1; 1145 unsigned m_containsDirtyOverlayScrollbars : 1;
1148 1146
1149 unsigned m_needsAncestorDependentCompositingInputsUpdate : 1; 1147 unsigned m_needsAncestorDependentCompositingInputsUpdate : 1;
1150 unsigned m_childNeedsCompositingInputsUpdate : 1; 1148 unsigned m_childNeedsCompositingInputsUpdate : 1;
1151 1149
1152 // Used only while determining what layers should be composited. Applies to 1150 // Used only while determining what layers should be composited. Applies to
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 1229
1232 } // namespace blink 1230 } // namespace blink
1233 1231
1234 #ifndef NDEBUG 1232 #ifndef NDEBUG
1235 // Outside the WebCore namespace for ease of invocation from gdb. 1233 // Outside the WebCore namespace for ease of invocation from gdb.
1236 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); 1234 CORE_EXPORT void showLayerTree(const blink::PaintLayer*);
1237 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); 1235 CORE_EXPORT void showLayerTree(const blink::LayoutObject*);
1238 #endif 1236 #endif
1239 1237
1240 #endif // Layer_h 1238 #endif // Layer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698