| 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 1955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1966 ASSERT(!paintsIntoCompositedAncestor()); | 1966 ASSERT(!paintsIntoCompositedAncestor()); |
| 1967 ApplyToGraphicsLayers(this, SetContentsNeedsDisplayFunctor(), ApplyToContent
Layers); | 1967 ApplyToGraphicsLayers(this, SetContentsNeedsDisplayFunctor(), ApplyToContent
Layers); |
| 1968 } | 1968 } |
| 1969 | 1969 |
| 1970 struct SetContentsNeedsDisplayInRectFunctor { | 1970 struct SetContentsNeedsDisplayInRectFunctor { |
| 1971 void operator() (GraphicsLayer* layer) const | 1971 void operator() (GraphicsLayer* layer) const |
| 1972 { | 1972 { |
| 1973 if (layer->drawsContent()) { | 1973 if (layer->drawsContent()) { |
| 1974 IntRect layerDirtyRect = r; | 1974 IntRect layerDirtyRect = r; |
| 1975 layerDirtyRect.move(-layer->offsetFromRenderer()); | 1975 layerDirtyRect.move(-layer->offsetFromRenderer()); |
| 1976 layer->setNeedsDisplayInRect(layerDirtyRect); | 1976 layer->setNeedsDisplayInRect(layerDirtyRect, annotations); |
| 1977 } | 1977 } |
| 1978 } | 1978 } |
| 1979 | 1979 |
| 1980 IntRect r; | 1980 IntRect r; |
| 1981 WebInvalidationDebugAnnotations annotations; |
| 1981 }; | 1982 }; |
| 1982 | 1983 |
| 1983 // r is in the coordinate space of the layer's render object | 1984 // r is in the coordinate space of the layer's render object |
| 1984 void CompositedLayerMapping::setContentsNeedDisplayInRect(const LayoutRect& r) | 1985 void CompositedLayerMapping::setContentsNeedDisplayInRect(const LayoutRect& r, W
ebInvalidationDebugAnnotations annotations) |
| 1985 { | 1986 { |
| 1986 // FIXME: need to split out paint invalidations for the background. | 1987 // FIXME: need to split out paint invalidations for the background. |
| 1987 ASSERT(!paintsIntoCompositedAncestor()); | 1988 ASSERT(!paintsIntoCompositedAncestor()); |
| 1988 | 1989 |
| 1989 SetContentsNeedsDisplayInRectFunctor functor = { | 1990 SetContentsNeedsDisplayInRectFunctor functor = { |
| 1990 pixelSnappedIntRect(r.location() + m_owningLayer.subpixelAccumulation(),
r.size()) | 1991 pixelSnappedIntRect(r.location() + m_owningLayer.subpixelAccumulation(),
r.size()), |
| 1992 annotations |
| 1991 }; | 1993 }; |
| 1992 ApplyToGraphicsLayers(this, functor, ApplyToContentLayers); | 1994 ApplyToGraphicsLayers(this, functor, ApplyToContentLayers); |
| 1993 } | 1995 } |
| 1994 | 1996 |
| 1995 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer(co
nst RenderObject* renderObject, const Vector<GraphicsLayerPaintInfo>& layers) | 1997 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer(co
nst RenderObject* renderObject, const Vector<GraphicsLayerPaintInfo>& layers) |
| 1996 { | 1998 { |
| 1997 for (size_t i = 0; i < layers.size(); ++i) { | 1999 for (size_t i = 0; i < layers.size(); ++i) { |
| 1998 if (renderObject->isDescendantOf(layers[i].renderLayer->renderer())) | 2000 if (renderObject->isDescendantOf(layers[i].renderLayer->renderer())) |
| 1999 return &layers[i]; | 2001 return &layers[i]; |
| 2000 } | 2002 } |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2294 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2296 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2295 name = "Scrolling Block Selection Layer"; | 2297 name = "Scrolling Block Selection Layer"; |
| 2296 } else { | 2298 } else { |
| 2297 ASSERT_NOT_REACHED(); | 2299 ASSERT_NOT_REACHED(); |
| 2298 } | 2300 } |
| 2299 | 2301 |
| 2300 return name; | 2302 return name; |
| 2301 } | 2303 } |
| 2302 | 2304 |
| 2303 } // namespace blink | 2305 } // namespace blink |
| OLD | NEW |