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 2157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2168 // NOTE: composited bounds are updated elsewhere | 2168 // NOTE: composited bounds are updated elsewhere |
2169 // NOTE: offsetFromRenderer is updated elsewhere | 2169 // NOTE: offsetFromRenderer is updated elsewhere |
2170 paintInfo.paintingPhase = GraphicsLayerPaintAllWithOverflowClip; | 2170 paintInfo.paintingPhase = GraphicsLayerPaintAllWithOverflowClip; |
2171 paintInfo.isBackgroundLayer = false; | 2171 paintInfo.isBackgroundLayer = false; |
2172 | 2172 |
2173 // Change tracking on squashing layers: at the first sign of something chang ed, just invalidate the layer. | 2173 // Change tracking on squashing layers: at the first sign of something chang ed, just invalidate the layer. |
2174 // FIXME: Perhaps we can find a tighter more clever mechanism later. | 2174 // FIXME: Perhaps we can find a tighter more clever mechanism later. |
2175 bool updatedAssignment = false; | 2175 bool updatedAssignment = false; |
2176 if (nextSquashedLayerIndex < m_squashedLayers.size()) { | 2176 if (nextSquashedLayerIndex < m_squashedLayers.size()) { |
2177 if (!paintInfo.isEquivalentForSquashing(m_squashedLayers[nextSquashedLay erIndex])) { | 2177 if (!paintInfo.isEquivalentForSquashing(m_squashedLayers[nextSquashedLay erIndex])) { |
2178 compositor()->repaintOnCompositingChange(squashedLayer); | |
2178 updatedAssignment = true; | 2179 updatedAssignment = true; |
2179 m_squashedLayers[nextSquashedLayerIndex] = paintInfo; | 2180 m_squashedLayers[nextSquashedLayerIndex] = paintInfo; |
2180 } | 2181 } |
2181 } else { | 2182 } else { |
2183 compositor()->repaintOnCompositingChange(squashedLayer); | |
2182 m_squashedLayers.append(paintInfo); | 2184 m_squashedLayers.append(paintInfo); |
2183 updatedAssignment = true; | 2185 updatedAssignment = true; |
2184 } | 2186 } |
ojan
2014/06/03 18:41:11
Nit: you could write this as follows to avoid some
chrishtr
2014/06/03 20:47:08
I'm doing it the current way because I want to hav
| |
2185 squashedLayer->setGroupedMapping(this); | 2187 squashedLayer->setGroupedMapping(this); |
2186 return updatedAssignment; | 2188 return updatedAssignment; |
2187 } | 2189 } |
2188 | 2190 |
2189 void CompositedLayerMapping::removeRenderLayerFromSquashingGraphicsLayer(const R enderLayer* layer) | 2191 void CompositedLayerMapping::removeRenderLayerFromSquashingGraphicsLayer(const R enderLayer* layer) |
2190 { | 2192 { |
2191 size_t layerIndex = kNotFound; | 2193 size_t layerIndex = kNotFound; |
2192 | 2194 |
2193 for (size_t i = 0; i < m_squashedLayers.size(); ++i) { | 2195 for (size_t i = 0; i < m_squashedLayers.size(); ++i) { |
2194 if (m_squashedLayers[i].renderLayer == layer) { | 2196 if (m_squashedLayers[i].renderLayer == layer) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2246 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2248 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2247 name = "Scrolling Contents Layer"; | 2249 name = "Scrolling Contents Layer"; |
2248 } else { | 2250 } else { |
2249 ASSERT_NOT_REACHED(); | 2251 ASSERT_NOT_REACHED(); |
2250 } | 2252 } |
2251 | 2253 |
2252 return name; | 2254 return name; |
2253 } | 2255 } |
2254 | 2256 |
2255 } // namespace WebCore | 2257 } // namespace WebCore |
OLD | NEW |