Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: Source/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 498193003: Add |GraphicsLayerDebugInfo::getAnnotatedInvalidationRects| (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add missing files Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after
1955 ASSERT(!paintsIntoCompositedAncestor()); 1955 ASSERT(!paintsIntoCompositedAncestor());
1956 ApplyToGraphicsLayers(this, SetContentsNeedsDisplayFunctor(), ApplyToContent Layers); 1956 ApplyToGraphicsLayers(this, SetContentsNeedsDisplayFunctor(), ApplyToContent Layers);
1957 } 1957 }
1958 1958
1959 struct SetContentsNeedsDisplayInRectFunctor { 1959 struct SetContentsNeedsDisplayInRectFunctor {
1960 void operator() (GraphicsLayer* layer) const 1960 void operator() (GraphicsLayer* layer) const
1961 { 1961 {
1962 if (layer->drawsContent()) { 1962 if (layer->drawsContent()) {
1963 IntRect layerDirtyRect = r; 1963 IntRect layerDirtyRect = r;
1964 layerDirtyRect.move(-layer->offsetFromRenderer()); 1964 layerDirtyRect.move(-layer->offsetFromRenderer());
1965 layer->setNeedsDisplayInRect(layerDirtyRect); 1965 layer->setNeedsDisplayInRect(layerDirtyRect, annotations);
1966 } 1966 }
1967 } 1967 }
1968 1968
1969 IntRect r; 1969 IntRect r;
1970 WebInvalidationDebugAnnotations annotations;
1970 }; 1971 };
1971 1972
1972 // r is in the coordinate space of the layer's render object 1973 // r is in the coordinate space of the layer's render object
1973 void CompositedLayerMapping::setContentsNeedDisplayInRect(const LayoutRect& r) 1974 void CompositedLayerMapping::setContentsNeedDisplayInRect(const LayoutRect& r, W ebInvalidationDebugAnnotations annotations)
1974 { 1975 {
1975 // FIXME: need to split out paint invalidations for the background. 1976 // FIXME: need to split out paint invalidations for the background.
1976 ASSERT(!paintsIntoCompositedAncestor()); 1977 ASSERT(!paintsIntoCompositedAncestor());
1977 1978
1978 SetContentsNeedsDisplayInRectFunctor functor = { 1979 SetContentsNeedsDisplayInRectFunctor functor = {
1979 pixelSnappedIntRect(r.location() + m_owningLayer.subpixelAccumulation(), r.size()) 1980 pixelSnappedIntRect(r.location() + m_owningLayer.subpixelAccumulation(), r.size()),
1981 annotations
1980 }; 1982 };
1981 ApplyToGraphicsLayers(this, functor, ApplyToContentLayers); 1983 ApplyToGraphicsLayers(this, functor, ApplyToContentLayers);
1982 } 1984 }
1983 1985
1984 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer(co nst RenderObject* renderObject, const Vector<GraphicsLayerPaintInfo>& layers) 1986 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer(co nst RenderObject* renderObject, const Vector<GraphicsLayerPaintInfo>& layers)
1985 { 1987 {
1986 for (size_t i = 0; i < layers.size(); ++i) { 1988 for (size_t i = 0; i < layers.size(); ++i) {
1987 if (renderObject->isDescendantOf(layers[i].renderLayer->renderer())) 1989 if (renderObject->isDescendantOf(layers[i].renderLayer->renderer()))
1988 return &layers[i]; 1990 return &layers[i];
1989 } 1991 }
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
2283 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2285 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2284 name = "Scrolling Block Selection Layer"; 2286 name = "Scrolling Block Selection Layer";
2285 } else { 2287 } else {
2286 ASSERT_NOT_REACHED(); 2288 ASSERT_NOT_REACHED();
2287 } 2289 }
2288 2290
2289 return name; 2291 return name;
2290 } 2292 }
2291 2293
2292 } // namespace blink 2294 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698