Chromium Code Reviews| 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 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1130 // The ancestor clipping layer is already set up and has m_graphicsL ayer under it. | 1130 // The ancestor clipping layer is already set up and has m_graphicsL ayer under it. |
| 1131 m_ancestorClippingLayer->addChild(m_squashingLayer.get()); | 1131 m_ancestorClippingLayer->addChild(m_squashingLayer.get()); |
| 1132 } | 1132 } |
| 1133 } | 1133 } |
| 1134 } | 1134 } |
| 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 scrollingContentsLayerPaintingPhase = Graphic sLayerPaintOverflowContents | GraphicsLayerPaintCompositedScroll; |
| 1141 if (!m_foregroundLayer) | 1141 if (m_foregroundLayer) |
| 1142 paintPhase |= GraphicsLayerPaintForeground; | 1142 m_foregroundLayer->setPaintingPhase(m_foregroundLayer->paintingPhase () | GraphicsLayerPaintOverflowContents); |
| 1143 m_scrollingContentsLayer->setPaintingPhase(paintPhase); | 1143 else |
| 1144 scrollingContentsLayerPaintingPhase |= GraphicsLayerPaintForeground; | |
| 1145 m_scrollingContentsLayer->setPaintingPhase(scrollingContentsLayerPaintin gPhase); | |
| 1146 } else if (m_foregroundLayer) { | |
| 1147 m_foregroundLayer->setPaintingPhase(m_foregroundLayer->paintingPhase() & ~GraphicsLayerPaintOverflowContents); | |
|
aelias_OOO_until_Jul13
2016/04/16 00:33:19
The bit-setting/clearing logic is a bit hard to re
Xianzhu
2016/04/16 22:07:36
Done with slight difference. Ptal.
aelias_OOO_until_Jul13
2016/04/18 17:09:41
Slight difference looks fine, but can you also del
Xianzhu
2016/04/18 18:06:47
Done.
| |
| 1144 } | 1148 } |
| 1145 } | 1149 } |
| 1146 | 1150 |
| 1147 void CompositedLayerMapping::updateContentsRect() | 1151 void CompositedLayerMapping::updateContentsRect() |
| 1148 { | 1152 { |
| 1149 m_graphicsLayer->setContentsRect(pixelSnappedIntRect(contentsBox())); | 1153 m_graphicsLayer->setContentsRect(pixelSnappedIntRect(contentsBox())); |
| 1150 } | 1154 } |
| 1151 | 1155 |
| 1152 void CompositedLayerMapping::updateContentsOffsetInCompositingLayer(const IntPoi nt& snappedOffsetFromCompositedAncestor, const IntPoint& graphicsLayerParentLoca tion) | 1156 void CompositedLayerMapping::updateContentsOffsetInCompositingLayer(const IntPoi nt& snappedOffsetFromCompositedAncestor, const IntPoint& graphicsLayerParentLoca tion) |
| 1153 { | 1157 { |
| (...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2568 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2572 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2569 name = "Scrolling Contents Layer"; | 2573 name = "Scrolling Contents Layer"; |
| 2570 } else { | 2574 } else { |
| 2571 ASSERT_NOT_REACHED(); | 2575 ASSERT_NOT_REACHED(); |
| 2572 } | 2576 } |
| 2573 | 2577 |
| 2574 return name; | 2578 return name; |
| 2575 } | 2579 } |
| 2576 | 2580 |
| 2577 } // namespace blink | 2581 } // namespace blink |
| OLD | NEW |