| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #if USE(ACCELERATED_COMPOSITING) | 7 #if USE(ACCELERATED_COMPOSITING) |
| 8 | 8 |
| 9 #include "CCDamageTracker.h" | 9 #include "CCDamageTracker.h" |
| 10 | 10 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 200 |
| 201 FloatRect CCDamageTracker::trackDamageFromLeftoverRects() | 201 FloatRect CCDamageTracker::trackDamageFromLeftoverRects() |
| 202 { | 202 { |
| 203 // After computing damage for all active layers, any leftover items in the c
urrent | 203 // After computing damage for all active layers, any leftover items in the c
urrent |
| 204 // rect history correspond to layers/surfaces that no longer exist. So, thes
e regions | 204 // rect history correspond to layers/surfaces that no longer exist. So, thes
e regions |
| 205 // are now exposed on the target surface. | 205 // are now exposed on the target surface. |
| 206 | 206 |
| 207 FloatRect damageRect = FloatRect(); | 207 FloatRect damageRect = FloatRect(); |
| 208 | 208 |
| 209 for (RectMap::iterator it = m_currentRectHistory->begin(); it != m_currentRe
ctHistory->end(); ++it) | 209 for (RectMap::iterator it = m_currentRectHistory->begin(); it != m_currentRe
ctHistory->end(); ++it) |
| 210 #if WTF_NEW_HASHMAP_ITERATORS_INTERFACE |
| 211 damageRect.unite(it->value); |
| 212 #else |
| 210 damageRect.unite(it->second); | 213 damageRect.unite(it->second); |
| 214 #endif |
| 211 | 215 |
| 212 m_currentRectHistory->clear(); | 216 m_currentRectHistory->clear(); |
| 213 | 217 |
| 214 return damageRect; | 218 return damageRect; |
| 215 } | 219 } |
| 216 | 220 |
| 217 static bool layerNeedsToRedrawOntoItsTargetSurface(CCLayerImpl* layer) | 221 static bool layerNeedsToRedrawOntoItsTargetSurface(CCLayerImpl* layer) |
| 218 { | 222 { |
| 219 // If the layer does NOT own a surface but has SurfacePropertyChanged, | 223 // If the layer does NOT own a surface but has SurfacePropertyChanged, |
| 220 // this means that its target surface is affected and needs to be redrawn. | 224 // this means that its target surface is affected and needs to be redrawn. |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 // at or below this layer. We expand the damage from this layer too, as we n
eed to readback those pixels from the surface with only | 340 // at or below this layer. We expand the damage from this layer too, as we n
eed to readback those pixels from the surface with only |
| 337 // the contents of layers below this one in them. This means we need to redr
aw any pixels in the surface being used for the blur in | 341 // the contents of layers below this one in them. This means we need to redr
aw any pixels in the surface being used for the blur in |
| 338 // this layer this frame. | 342 // this layer this frame. |
| 339 if (layer->backgroundFilters().hasFilterThatMovesPixels()) | 343 if (layer->backgroundFilters().hasFilterThatMovesPixels()) |
| 340 expandDamageRectInsideRectWithFilters(targetDamageRect, surfaceRectInTar
getSpace, layer->backgroundFilters()); | 344 expandDamageRectInsideRectWithFilters(targetDamageRect, surfaceRectInTar
getSpace, layer->backgroundFilters()); |
| 341 } | 345 } |
| 342 | 346 |
| 343 } // namespace cc | 347 } // namespace cc |
| 344 | 348 |
| 345 #endif // USE(ACCELERATED_COMPOSITING) | 349 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |