| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex); | 147 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex); |
| 148 void updateRenderingContext(); | 148 void updateRenderingContext(); |
| 149 void updateShouldFlattenTransform(); | 149 void updateShouldFlattenTransform(); |
| 150 | 150 |
| 151 // GraphicsLayerClient interface | 151 // GraphicsLayerClient interface |
| 152 void notifyAnimationStarted(const GraphicsLayer*, double monotonicTime, int
group) override; | 152 void notifyAnimationStarted(const GraphicsLayer*, double monotonicTime, int
group) override; |
| 153 void notifyFirstPaint() override; | 153 void notifyFirstPaint() override; |
| 154 void notifyFirstTextPaint() override; | 154 void notifyFirstTextPaint() override; |
| 155 void notifyFirstImagePaint() override; | 155 void notifyFirstImagePaint() override; |
| 156 | 156 |
| 157 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain
tingPhase, const IntRect& clip) const override; | 157 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain
tingPhase, const IntRect* clip) const override; |
| 158 void paintContentsIfNeeded(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase) const override; | |
| 159 bool isTrackingPaintInvalidations() const override; | 158 bool isTrackingPaintInvalidations() const override; |
| 160 | 159 |
| 161 #if ENABLE(ASSERT) | 160 #if ENABLE(ASSERT) |
| 162 void verifyNotPainting() override; | 161 void verifyNotPainting() override; |
| 163 #endif | 162 #endif |
| 164 | 163 |
| 165 LayoutRect contentsBox() const; | 164 LayoutRect contentsBox() const; |
| 166 | 165 |
| 167 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo
ntalScrollbar.get(); } | 166 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo
ntalScrollbar.get(); } |
| 168 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical
Scrollbar.get(); } | 167 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical
Scrollbar.get(); } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 // If there is a squashed layer painting into this CLM that is an ancestor o
f the given LayoutObject, return it. Otherwise return nullptr. | 206 // If there is a squashed layer painting into this CLM that is an ancestor o
f the given LayoutObject, return it. Otherwise return nullptr. |
| 208 const GraphicsLayerPaintInfo* containingSquashedLayer(const LayoutObject*, u
nsigned maxSquashedLayerIndex); | 207 const GraphicsLayerPaintInfo* containingSquashedLayer(const LayoutObject*, u
nsigned maxSquashedLayerIndex); |
| 209 | 208 |
| 210 void updateScrollingBlockSelection(); | 209 void updateScrollingBlockSelection(); |
| 211 | 210 |
| 212 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi
s); } | 211 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi
s); } |
| 213 String debugName() const { return "CompositedLayerMapping for " + owningLaye
r().debugName(); } | 212 String debugName() const { return "CompositedLayerMapping for " + owningLaye
r().debugName(); } |
| 214 | 213 |
| 215 private: | 214 private: |
| 216 static IntRect computeInterestRect(const GraphicsLayer*, LayoutObject* ownin
gLayoutObject); | 215 static IntRect computeInterestRect(const GraphicsLayer*, LayoutObject* ownin
gLayoutObject); |
| 216 static bool interestRectChangedEnoughToRepaint(const IntRect& previousIntere
stRect, const IntRect& newInterestRect, const IntSize& layerSize); |
| 217 | 217 |
| 218 static const GraphicsLayerPaintInfo* containingSquashedLayer(const LayoutObj
ect*, const Vector<GraphicsLayerPaintInfo>& layers, unsigned maxSquashedLayerIn
dex); | 218 static const GraphicsLayerPaintInfo* containingSquashedLayer(const LayoutObj
ect*, const Vector<GraphicsLayerPaintInfo>& layers, unsigned maxSquashedLayerIn
dex); |
| 219 | 219 |
| 220 // Helper methods to updateGraphicsLayerGeometry: | 220 // Helper methods to updateGraphicsLayerGeometry: |
| 221 void computeGraphicsLayerParentLocation(const PaintLayer* compositingContain
er, const IntRect& ancestorCompositingBounds, IntPoint& graphicsLayerParentLocat
ion); | 221 void computeGraphicsLayerParentLocation(const PaintLayer* compositingContain
er, const IntRect& ancestorCompositingBounds, IntPoint& graphicsLayerParentLocat
ion); |
| 222 void updateSquashingLayerGeometry(const LayoutPoint& offsetFromCompositedAnc
estor, const IntPoint& graphicsLayerParentLocation, const PaintLayer& referenceL
ayer, Vector<GraphicsLayerPaintInfo>& layers, GraphicsLayer*, LayoutPoint* offse
tFromTransformedAncestor, Vector<PaintLayer*>& layersNeedingPaintInvalidation); | 222 void updateSquashingLayerGeometry(const LayoutPoint& offsetFromCompositedAnc
estor, const IntPoint& graphicsLayerParentLocation, const PaintLayer& referenceL
ayer, Vector<GraphicsLayerPaintInfo>& layers, GraphicsLayer*, LayoutPoint* offse
tFromTransformedAncestor, Vector<PaintLayer*>& layersNeedingPaintInvalidation); |
| 223 void updateMainGraphicsLayerGeometry(const IntRect& relativeCompositingBound
s, const IntRect& localCompositingBounds, const IntPoint& graphicsLayerParentLoc
ation); | 223 void updateMainGraphicsLayerGeometry(const IntRect& relativeCompositingBound
s, const IntRect& localCompositingBounds, const IntPoint& graphicsLayerParentLoc
ation); |
| 224 void updateAncestorClippingLayerGeometry(const PaintLayer* compositingContai
ner, const IntPoint& snappedOffsetFromCompositedAncestor, IntPoint& graphicsLaye
rParentLocation); | 224 void updateAncestorClippingLayerGeometry(const PaintLayer* compositingContai
ner, const IntPoint& snappedOffsetFromCompositedAncestor, IntPoint& graphicsLaye
rParentLocation); |
| 225 void updateOverflowControlsHostLayerGeometry(const PaintLayer* compositingSt
ackingContext, const PaintLayer* compositingContainer); | 225 void updateOverflowControlsHostLayerGeometry(const PaintLayer* compositingSt
ackingContext, const PaintLayer* compositingContainer); |
| 226 void updateChildContainmentLayerGeometry(const IntRect& clippingBox, const I
ntRect& localCompositingBounds); | 226 void updateChildContainmentLayerGeometry(const IntRect& clippingBox, const I
ntRect& localCompositingBounds); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 // Return true if |m_owningLayer|'s compositing ancestor is not a descendant
(inclusive) of the | 309 // Return true if |m_owningLayer|'s compositing ancestor is not a descendant
(inclusive) of the |
| 310 // clipping container for |m_owningLayer|. | 310 // clipping container for |m_owningLayer|. |
| 311 bool owningLayerClippedByLayerNotAboveCompositedAncestor(PaintLayer* scrollP
arent); | 311 bool owningLayerClippedByLayerNotAboveCompositedAncestor(PaintLayer* scrollP
arent); |
| 312 | 312 |
| 313 PaintLayer* scrollParent(); | 313 PaintLayer* scrollParent(); |
| 314 | 314 |
| 315 // Clear the groupedMapping entry on the layer at the given index, only if t
hat layer does | 315 // Clear the groupedMapping entry on the layer at the given index, only if t
hat layer does |
| 316 // not appear earlier in the set of layers for this object. | 316 // not appear earlier in the set of layers for this object. |
| 317 bool invalidateLayerIfNoPrecedingEntry(size_t); | 317 bool invalidateLayerIfNoPrecedingEntry(size_t); |
| 318 | 318 |
| 319 void paintContentsInternal(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& interestRect) const; |
| 320 |
| 319 PaintLayer& m_owningLayer; | 321 PaintLayer& m_owningLayer; |
| 320 | 322 |
| 321 // The hierarchy of layers that is maintained by the CompositedLayerMapping
looks like this: | 323 // The hierarchy of layers that is maintained by the CompositedLayerMapping
looks like this: |
| 322 // | 324 // |
| 323 // + m_ancestorClippingLayer [OPTIONAL] | 325 // + m_ancestorClippingLayer [OPTIONAL] |
| 324 // + m_graphicsLayer | 326 // + m_graphicsLayer |
| 325 // + m_childTransformLayer [OPTIONAL] | 327 // + m_childTransformLayer [OPTIONAL] |
| 326 // | + m_childContainmentLayer [OPTIONAL] <-OR-> m_scrollingLayer [OPTI
ONAL] | 328 // | + m_childContainmentLayer [OPTIONAL] <-OR-> m_scrollingLayer [OPTI
ONAL] |
| 327 // | + m_scrollingContentsL
ayer [Present iff m_scrollingLayer is present] | 329 // | + m_scrollingContentsL
ayer [Present iff m_scrollingLayer is present] |
| 328 // | + m_scrollingBlockSe
lectionLayer [Present iff m_scrollingLayer is present] | 330 // | + m_scrollingBlockSe
lectionLayer [Present iff m_scrollingLayer is present] |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 | 434 |
| 433 LayoutSize m_contentOffsetInCompositingLayer; | 435 LayoutSize m_contentOffsetInCompositingLayer; |
| 434 unsigned m_contentOffsetInCompositingLayerDirty : 1; | 436 unsigned m_contentOffsetInCompositingLayerDirty : 1; |
| 435 | 437 |
| 436 unsigned m_pendingUpdateScope : 2; | 438 unsigned m_pendingUpdateScope : 2; |
| 437 unsigned m_isMainFrameLayoutViewLayer : 1; | 439 unsigned m_isMainFrameLayoutViewLayer : 1; |
| 438 | 440 |
| 439 unsigned m_backgroundLayerPaintsFixedRootBackground : 1; | 441 unsigned m_backgroundLayerPaintsFixedRootBackground : 1; |
| 440 unsigned m_scrollingContentsAreEmpty : 1; | 442 unsigned m_scrollingContentsAreEmpty : 1; |
| 441 | 443 |
| 444 mutable IntRect m_previousPaintInterestRect; |
| 445 |
| 442 friend class CompositedLayerMappingTest; | 446 friend class CompositedLayerMappingTest; |
| 443 }; | 447 }; |
| 444 | 448 |
| 445 } // namespace blink | 449 } // namespace blink |
| 446 | 450 |
| 447 #endif // CompositedLayerMapping_h | 451 #endif // CompositedLayerMapping_h |
| OLD | NEW |