| 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 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 | 1135 |
| 1136 void CompositedLayerMapping::updatePaintingPhases() | 1136 void CompositedLayerMapping::updatePaintingPhases() |
| 1137 { | 1137 { |
| 1138 m_graphicsLayer->setPaintingPhase(paintingPhaseForPrimaryLayer()); | 1138 m_graphicsLayer->setPaintingPhase(paintingPhaseForPrimaryLayer()); |
| 1139 if (m_scrollingContentsLayer) { | 1139 if (m_scrollingContentsLayer) { |
| 1140 GraphicsLayerPaintingPhase paintPhase = GraphicsLayerPaintOverflowConten
ts | GraphicsLayerPaintCompositedScroll; | 1140 GraphicsLayerPaintingPhase paintPhase = GraphicsLayerPaintOverflowConten
ts | GraphicsLayerPaintCompositedScroll; |
| 1141 if (!m_foregroundLayer) | 1141 if (!m_foregroundLayer) |
| 1142 paintPhase |= GraphicsLayerPaintForeground; | 1142 paintPhase |= GraphicsLayerPaintForeground; |
| 1143 m_scrollingContentsLayer->setPaintingPhase(paintPhase); | 1143 m_scrollingContentsLayer->setPaintingPhase(paintPhase); |
| 1144 } | 1144 } |
| 1145 if (m_foregroundLayer) { |
| 1146 GraphicsLayerPaintingPhase paintPhase = GraphicsLayerPaintForeground; |
| 1147 if (m_scrollingContentsLayer) |
| 1148 paintPhase |= GraphicsLayerPaintOverflowContents; |
| 1149 m_foregroundLayer->setPaintingPhase(paintPhase); |
| 1150 } |
| 1145 } | 1151 } |
| 1146 | 1152 |
| 1147 void CompositedLayerMapping::updateContentsRect() | 1153 void CompositedLayerMapping::updateContentsRect() |
| 1148 { | 1154 { |
| 1149 m_graphicsLayer->setContentsRect(pixelSnappedIntRect(contentsBox())); | 1155 m_graphicsLayer->setContentsRect(pixelSnappedIntRect(contentsBox())); |
| 1150 } | 1156 } |
| 1151 | 1157 |
| 1152 void CompositedLayerMapping::updateContentsOffsetInCompositingLayer(const IntPoi
nt& snappedOffsetFromCompositedAncestor, const IntPoint& graphicsLayerParentLoca
tion) | 1158 void CompositedLayerMapping::updateContentsOffsetInCompositingLayer(const IntPoi
nt& snappedOffsetFromCompositedAncestor, const IntPoint& graphicsLayerParentLoca
tion) |
| 1153 { | 1159 { |
| 1154 // m_graphicsLayer is positioned relative to our compositing ancestor | 1160 // m_graphicsLayer is positioned relative to our compositing ancestor |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1516 m_scrollingContentsLayer->setCompositorMutableProperties(scrollMutablePr
operties); | 1522 m_scrollingContentsLayer->setCompositorMutableProperties(scrollMutablePr
operties); |
| 1517 } | 1523 } |
| 1518 } | 1524 } |
| 1519 | 1525 |
| 1520 bool CompositedLayerMapping::updateForegroundLayer(bool needsForegroundLayer) | 1526 bool CompositedLayerMapping::updateForegroundLayer(bool needsForegroundLayer) |
| 1521 { | 1527 { |
| 1522 bool layerChanged = false; | 1528 bool layerChanged = false; |
| 1523 if (needsForegroundLayer) { | 1529 if (needsForegroundLayer) { |
| 1524 if (!m_foregroundLayer) { | 1530 if (!m_foregroundLayer) { |
| 1525 m_foregroundLayer = createGraphicsLayer(CompositingReasonLayerForFor
eground); | 1531 m_foregroundLayer = createGraphicsLayer(CompositingReasonLayerForFor
eground); |
| 1526 m_foregroundLayer->setPaintingPhase(GraphicsLayerPaintForeground); | |
| 1527 layerChanged = true; | 1532 layerChanged = true; |
| 1528 } | 1533 } |
| 1529 } else if (m_foregroundLayer) { | 1534 } else if (m_foregroundLayer) { |
| 1530 m_foregroundLayer->removeFromParent(); | 1535 m_foregroundLayer->removeFromParent(); |
| 1531 m_foregroundLayer = nullptr; | 1536 m_foregroundLayer = nullptr; |
| 1532 layerChanged = true; | 1537 layerChanged = true; |
| 1533 } | 1538 } |
| 1534 | 1539 |
| 1535 return layerChanged; | 1540 return layerChanged; |
| 1536 } | 1541 } |
| (...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2568 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2573 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2569 name = "Scrolling Contents Layer"; | 2574 name = "Scrolling Contents Layer"; |
| 2570 } else { | 2575 } else { |
| 2571 ASSERT_NOT_REACHED(); | 2576 ASSERT_NOT_REACHED(); |
| 2572 } | 2577 } |
| 2573 | 2578 |
| 2574 return name; | 2579 return name; |
| 2575 } | 2580 } |
| 2576 | 2581 |
| 2577 } // namespace blink | 2582 } // namespace blink |
| OLD | NEW |