| 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 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2021 ASSERT(!paintsIntoCompositedAncestor()); | 2021 ASSERT(!paintsIntoCompositedAncestor()); |
| 2022 ApplyToGraphicsLayers(this, SetContentsNeedsDisplayFunctor(), ApplyToContent
Layers); | 2022 ApplyToGraphicsLayers(this, SetContentsNeedsDisplayFunctor(), ApplyToContent
Layers); |
| 2023 } | 2023 } |
| 2024 | 2024 |
| 2025 struct SetContentsNeedsDisplayInRectFunctor { | 2025 struct SetContentsNeedsDisplayInRectFunctor { |
| 2026 void operator() (GraphicsLayer* layer) const | 2026 void operator() (GraphicsLayer* layer) const |
| 2027 { | 2027 { |
| 2028 if (layer->drawsContent()) { | 2028 if (layer->drawsContent()) { |
| 2029 IntRect layerDirtyRect = r; | 2029 IntRect layerDirtyRect = r; |
| 2030 layerDirtyRect.move(-layer->offsetFromRenderer()); | 2030 layerDirtyRect.move(-layer->offsetFromRenderer()); |
| 2031 layer->setNeedsDisplayInRect(layerDirtyRect); | 2031 layer->setNeedsDisplayInRect(layerDirtyRect, annotations); |
| 2032 } | 2032 } |
| 2033 } | 2033 } |
| 2034 | 2034 |
| 2035 IntRect r; | 2035 IntRect r; |
| 2036 WebInvalidationDebugAnnotations annotations; |
| 2036 }; | 2037 }; |
| 2037 | 2038 |
| 2038 // r is in the coordinate space of the layer's render object | 2039 // r is in the coordinate space of the layer's render object |
| 2039 void CompositedLayerMapping::setContentsNeedDisplayInRect(const LayoutRect& r) | 2040 void CompositedLayerMapping::setContentsNeedDisplayInRect(const LayoutRect& r, W
ebInvalidationDebugAnnotations annotations) |
| 2040 { | 2041 { |
| 2041 // FIXME: need to split out paint invalidations for the background. | 2042 // FIXME: need to split out paint invalidations for the background. |
| 2042 ASSERT(!paintsIntoCompositedAncestor()); | 2043 ASSERT(!paintsIntoCompositedAncestor()); |
| 2043 | 2044 |
| 2044 SetContentsNeedsDisplayInRectFunctor functor = { | 2045 SetContentsNeedsDisplayInRectFunctor functor = { |
| 2045 pixelSnappedIntRect(r.location() + m_owningLayer.subpixelAccumulation(),
r.size()) | 2046 pixelSnappedIntRect(r.location() + m_owningLayer.subpixelAccumulation(),
r.size()), |
| 2047 annotations |
| 2046 }; | 2048 }; |
| 2047 ApplyToGraphicsLayers(this, functor, ApplyToContentLayers); | 2049 ApplyToGraphicsLayers(this, functor, ApplyToContentLayers); |
| 2048 } | 2050 } |
| 2049 | 2051 |
| 2050 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer(co
nst RenderObject* renderObject, const Vector<GraphicsLayerPaintInfo>& layers) | 2052 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer(co
nst RenderObject* renderObject, const Vector<GraphicsLayerPaintInfo>& layers) |
| 2051 { | 2053 { |
| 2052 for (size_t i = 0; i < layers.size(); ++i) { | 2054 for (size_t i = 0; i < layers.size(); ++i) { |
| 2053 if (renderObject->isDescendantOf(layers[i].renderLayer->renderer())) | 2055 if (renderObject->isDescendantOf(layers[i].renderLayer->renderer())) |
| 2054 return &layers[i]; | 2056 return &layers[i]; |
| 2055 } | 2057 } |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2349 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2351 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2350 name = "Scrolling Block Selection Layer"; | 2352 name = "Scrolling Block Selection Layer"; |
| 2351 } else { | 2353 } else { |
| 2352 ASSERT_NOT_REACHED(); | 2354 ASSERT_NOT_REACHED(); |
| 2353 } | 2355 } |
| 2354 | 2356 |
| 2355 return name; | 2357 return name; |
| 2356 } | 2358 } |
| 2357 | 2359 |
| 2358 } // namespace blink | 2360 } // namespace blink |
| OLD | NEW |