Chromium Code Reviews| 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 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1912 IntRect layerDirtyRect = r; | 1912 IntRect layerDirtyRect = r; |
| 1913 layerDirtyRect.move(-layer->offsetFromRenderer()); | 1913 layerDirtyRect.move(-layer->offsetFromRenderer()); |
| 1914 layer->setNeedsDisplayInRect(layerDirtyRect); | 1914 layer->setNeedsDisplayInRect(layerDirtyRect); |
| 1915 } | 1915 } |
| 1916 } | 1916 } |
| 1917 | 1917 |
| 1918 IntRect r; | 1918 IntRect r; |
| 1919 }; | 1919 }; |
| 1920 | 1920 |
| 1921 // r is in the coordinate space of the layer's render object | 1921 // r is in the coordinate space of the layer's render object |
| 1922 void CompositedLayerMapping::setContentsNeedDisplayInRect(const IntRect& r) | 1922 void CompositedLayerMapping::setContentsNeedDisplayInRect(const LayoutRect& r) |
| 1923 { | 1923 { |
| 1924 // FIXME: need to split out repaints for the background. | 1924 // FIXME: need to split out repaints for the background. |
| 1925 ASSERT(!paintsIntoCompositedAncestor()); | 1925 ASSERT(!paintsIntoCompositedAncestor()); |
| 1926 SetContentsNeedsDisplayInRectFunctor functor = { r }; | 1926 |
| 1927 SetContentsNeedsDisplayInRectFunctor functor = { | |
| 1928 pixelSnappedIntRect(r.location() + m_owningLayer.subpixelAccumulation(), r.size()) | |
|
chrishtr
2014/07/02 16:59:24
It's not quite what I had in mind. Instead of usin
Xianzhu
2014/07/02 17:17:54
I think we should keep 'adjusting of rects with su
| |
| 1929 }; | |
| 1927 ApplyToGraphicsLayers(this, functor, ApplyToContentLayers); | 1930 ApplyToGraphicsLayers(this, functor, ApplyToContentLayers); |
| 1928 } | 1931 } |
| 1929 | 1932 |
| 1930 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer(co nst RenderObject* renderObject, const Vector<GraphicsLayerPaintInfo>& layers) | 1933 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer(co nst RenderObject* renderObject, const Vector<GraphicsLayerPaintInfo>& layers) |
| 1931 { | 1934 { |
| 1932 for (size_t i = 0; i < layers.size(); ++i) { | 1935 for (size_t i = 0; i < layers.size(); ++i) { |
| 1933 if (renderObject->isDescendantOf(layers[i].renderLayer->renderer())) { | 1936 if (renderObject->isDescendantOf(layers[i].renderLayer->renderer())) { |
| 1934 return &layers[i]; | 1937 return &layers[i]; |
| 1935 break; | 1938 break; |
| 1936 } | 1939 } |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2236 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2239 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2237 name = "Scrolling Block Selection Layer"; | 2240 name = "Scrolling Block Selection Layer"; |
| 2238 } else { | 2241 } else { |
| 2239 ASSERT_NOT_REACHED(); | 2242 ASSERT_NOT_REACHED(); |
| 2240 } | 2243 } |
| 2241 | 2244 |
| 2242 return name; | 2245 return name; |
| 2243 } | 2246 } |
| 2244 | 2247 |
| 2245 } // namespace WebCore | 2248 } // namespace WebCore |
| OLD | NEW |