| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // GraphicsLayers of the composited layer tree. Each instance of CompositedDepre
catedPaintLayerMapping | 63 // GraphicsLayers of the composited layer tree. Each instance of CompositedDepre
catedPaintLayerMapping |
| 64 // manages a small cluster of GraphicsLayers and the references to which Layers | 64 // manages a small cluster of GraphicsLayers and the references to which Layers |
| 65 // and paint phases contribute to each GraphicsLayer. | 65 // and paint phases contribute to each GraphicsLayer. |
| 66 // | 66 // |
| 67 // Currently (Oct. 2013) there is one CompositedDeprecatedPaintLayerMapping for
each Layer, | 67 // Currently (Oct. 2013) there is one CompositedDeprecatedPaintLayerMapping for
each Layer, |
| 68 // but this is likely to evolve soon. | 68 // but this is likely to evolve soon. |
| 69 class CompositedDeprecatedPaintLayerMapping final : public GraphicsLayerClient { | 69 class CompositedDeprecatedPaintLayerMapping final : public GraphicsLayerClient { |
| 70 WTF_MAKE_NONCOPYABLE(CompositedDeprecatedPaintLayerMapping); WTF_MAKE_FAST_A
LLOCATED(CompositedDeprecatedPaintLayerMapping); | 70 WTF_MAKE_NONCOPYABLE(CompositedDeprecatedPaintLayerMapping); WTF_MAKE_FAST_A
LLOCATED(CompositedDeprecatedPaintLayerMapping); |
| 71 public: | 71 public: |
| 72 explicit CompositedDeprecatedPaintLayerMapping(DeprecatedPaintLayer&); | 72 explicit CompositedDeprecatedPaintLayerMapping(DeprecatedPaintLayer&); |
| 73 virtual ~CompositedDeprecatedPaintLayerMapping(); | 73 ~CompositedDeprecatedPaintLayerMapping() override; |
| 74 | 74 |
| 75 DeprecatedPaintLayer& owningLayer() const { return m_owningLayer; } | 75 DeprecatedPaintLayer& owningLayer() const { return m_owningLayer; } |
| 76 | 76 |
| 77 bool updateGraphicsLayerConfiguration(); | 77 bool updateGraphicsLayerConfiguration(); |
| 78 void updateGraphicsLayerGeometry(const DeprecatedPaintLayer* compositingCont
ainer, const DeprecatedPaintLayer* compositingStackingContext, Vector<Deprecated
PaintLayer*>& layersNeedingPaintInvalidation); | 78 void updateGraphicsLayerGeometry(const DeprecatedPaintLayer* compositingCont
ainer, const DeprecatedPaintLayer* compositingStackingContext, Vector<Deprecated
PaintLayer*>& layersNeedingPaintInvalidation); |
| 79 | 79 |
| 80 // Update whether layer needs blending. | 80 // Update whether layer needs blending. |
| 81 void updateContentsOpaque(); | 81 void updateContentsOpaque(); |
| 82 | 82 |
| 83 GraphicsLayer* mainGraphicsLayer() const { return m_graphicsLayer.get(); } | 83 GraphicsLayer* mainGraphicsLayer() const { return m_graphicsLayer.get(); } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 // Returns true if the assignment actually changed the assigned squashing la
yer. | 134 // Returns true if the assignment actually changed the assigned squashing la
yer. |
| 135 bool updateSquashingLayerAssignment(DeprecatedPaintLayer* squashedLayer, con
st DeprecatedPaintLayer& owningLayer, size_t nextSquashedLayerIndex); | 135 bool updateSquashingLayerAssignment(DeprecatedPaintLayer* squashedLayer, con
st DeprecatedPaintLayer& owningLayer, size_t nextSquashedLayerIndex); |
| 136 void removeLayerFromSquashingGraphicsLayer(const DeprecatedPaintLayer*); | 136 void removeLayerFromSquashingGraphicsLayer(const DeprecatedPaintLayer*); |
| 137 | 137 |
| 138 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex); | 138 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex); |
| 139 void updateRenderingContext(); | 139 void updateRenderingContext(); |
| 140 void updateShouldFlattenTransform(); | 140 void updateShouldFlattenTransform(); |
| 141 | 141 |
| 142 // GraphicsLayerClient interface | 142 // GraphicsLayerClient interface |
| 143 virtual void notifyAnimationStarted(const GraphicsLayer*, double monotonicTi
me, int group) override; | 143 void notifyAnimationStarted(const GraphicsLayer*, double monotonicTime, int
group) override; |
| 144 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& clip) override; | 144 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain
tingPhase, const IntRect& clip) override; |
| 145 virtual bool isTrackingPaintInvalidations() const override; | 145 bool isTrackingPaintInvalidations() const override; |
| 146 | 146 |
| 147 #if ENABLE(ASSERT) | 147 #if ENABLE(ASSERT) |
| 148 virtual void verifyNotPainting() override; | 148 void verifyNotPainting() override; |
| 149 #endif | 149 #endif |
| 150 | 150 |
| 151 LayoutRect contentsBox() const; | 151 LayoutRect contentsBox() const; |
| 152 | 152 |
| 153 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo
ntalScrollbar.get(); } | 153 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo
ntalScrollbar.get(); } |
| 154 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical
Scrollbar.get(); } | 154 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical
Scrollbar.get(); } |
| 155 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.
get(); } | 155 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.
get(); } |
| 156 | 156 |
| 157 // Returns true if the overflow controls cannot be positioned within this | 157 // Returns true if the overflow controls cannot be positioned within this |
| 158 // CLM's internal hierarchy without incorrectly stacking under some | 158 // CLM's internal hierarchy without incorrectly stacking under some |
| (...skipping 14 matching lines...) Expand all Loading... |
| 173 bool needsGraphicsLayerUpdate() { return m_pendingUpdateScope > GraphicsLaye
rUpdateNone; } | 173 bool needsGraphicsLayerUpdate() { return m_pendingUpdateScope > GraphicsLaye
rUpdateNone; } |
| 174 void setNeedsGraphicsLayerUpdate(GraphicsLayerUpdateScope scope) { m_pending
UpdateScope = std::max(static_cast<GraphicsLayerUpdateScope>(m_pendingUpdateScop
e), scope); } | 174 void setNeedsGraphicsLayerUpdate(GraphicsLayerUpdateScope scope) { m_pending
UpdateScope = std::max(static_cast<GraphicsLayerUpdateScope>(m_pendingUpdateScop
e), scope); } |
| 175 void clearNeedsGraphicsLayerUpdate() { m_pendingUpdateScope = GraphicsLayerU
pdateNone; } | 175 void clearNeedsGraphicsLayerUpdate() { m_pendingUpdateScope = GraphicsLayerU
pdateNone; } |
| 176 | 176 |
| 177 GraphicsLayerUpdater::UpdateType updateTypeForChildren(GraphicsLayerUpdater:
:UpdateType) const; | 177 GraphicsLayerUpdater::UpdateType updateTypeForChildren(GraphicsLayerUpdater:
:UpdateType) const; |
| 178 | 178 |
| 179 #if ENABLE(ASSERT) | 179 #if ENABLE(ASSERT) |
| 180 void assertNeedsToUpdateGraphicsLayerBitsCleared() { ASSERT(m_pendingUpdate
Scope == GraphicsLayerUpdateNone); } | 180 void assertNeedsToUpdateGraphicsLayerBitsCleared() { ASSERT(m_pendingUpdate
Scope == GraphicsLayerUpdateNone); } |
| 181 #endif | 181 #endif |
| 182 | 182 |
| 183 virtual String debugName(const GraphicsLayer*) override; | 183 String debugName(const GraphicsLayer*) override; |
| 184 | 184 |
| 185 LayoutSize contentOffsetInCompositingLayer() const; | 185 LayoutSize contentOffsetInCompositingLayer() const; |
| 186 | 186 |
| 187 LayoutPoint squashingOffsetFromTransformedAncestor() | 187 LayoutPoint squashingOffsetFromTransformedAncestor() |
| 188 { | 188 { |
| 189 return m_squashingLayerOffsetFromTransformedAncestor; | 189 return m_squashingLayerOffsetFromTransformedAncestor; |
| 190 } | 190 } |
| 191 | 191 |
| 192 // If there is a squashed layer painting into this CLM that is an ancestor o
f the given LayoutObject, return it. Otherwise return nullptr. | 192 // If there is a squashed layer painting into this CLM that is an ancestor o
f the given LayoutObject, return it. Otherwise return nullptr. |
| 193 const GraphicsLayerPaintInfo* containingSquashedLayer(const LayoutObject*, u
nsigned maxSquashedLayerIndex); | 193 const GraphicsLayerPaintInfo* containingSquashedLayer(const LayoutObject*, u
nsigned maxSquashedLayerIndex); |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 unsigned m_pendingUpdateScope : 2; | 416 unsigned m_pendingUpdateScope : 2; |
| 417 unsigned m_isMainFrameLayoutViewLayer : 1; | 417 unsigned m_isMainFrameLayoutViewLayer : 1; |
| 418 | 418 |
| 419 unsigned m_backgroundLayerPaintsFixedRootBackground : 1; | 419 unsigned m_backgroundLayerPaintsFixedRootBackground : 1; |
| 420 unsigned m_scrollingContentsAreEmpty : 1; | 420 unsigned m_scrollingContentsAreEmpty : 1; |
| 421 }; | 421 }; |
| 422 | 422 |
| 423 } // namespace blink | 423 } // namespace blink |
| 424 | 424 |
| 425 #endif // CompositedDeprecatedPaintLayerMapping_h | 425 #endif // CompositedDeprecatedPaintLayerMapping_h |
| OLD | NEW |