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 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2132 // ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | 2132 // ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
2133 | 2133 |
2134 SetContentsNeedsDisplayInRectFunctor functor = { | 2134 SetContentsNeedsDisplayInRectFunctor functor = { |
2135 enclosingIntRect(LayoutRect(r.location() + m_owningLayer.subpixelAccumul
ation(), r.size())), | 2135 enclosingIntRect(LayoutRect(r.location() + m_owningLayer.subpixelAccumul
ation(), r.size())), |
2136 invalidationReason, | 2136 invalidationReason, |
2137 client | 2137 client |
2138 }; | 2138 }; |
2139 ApplyToGraphicsLayers(this, functor, ApplyToScrollingContentLayers); | 2139 ApplyToGraphicsLayers(this, functor, ApplyToScrollingContentLayers); |
2140 } | 2140 } |
2141 | 2141 |
2142 void CompositedLayerMapping::scrollingDisplayItemClientWasInvalidated(const Disp
layItemClient& displayItemClient, PaintInvalidationReason paintInvalidationReaso
n) | |
2143 { | |
2144 ApplyToGraphicsLayers(this, [&displayItemClient, paintInvalidationReason](Gr
aphicsLayer* layer) { | |
2145 layer->displayItemClientWasInvalidated(displayItemClient, paintInvalidat
ionReason); | |
2146 }, ApplyToScrollingContentLayers); | |
2147 } | |
2148 | |
2149 void CompositedLayerMapping::displayItemClientWasInvalidated(const DisplayItemCl
ient& displayItemClient, PaintInvalidationReason paintInvalidationReason) | |
2150 { | |
2151 ApplyToGraphicsLayers(this, [&displayItemClient, paintInvalidationReason](Gr
aphicsLayer* layer) { | |
2152 layer->displayItemClientWasInvalidated(displayItemClient, paintInvalidat
ionReason); | |
2153 }, ApplyToContentLayers); | |
2154 } | |
2155 | |
2156 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer(co
nst LayoutObject* layoutObject, const Vector<GraphicsLayerPaintInfo>& layers, un
signed maxSquashedLayerIndex) | 2142 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer(co
nst LayoutObject* layoutObject, const Vector<GraphicsLayerPaintInfo>& layers, un
signed maxSquashedLayerIndex) |
2157 { | 2143 { |
2158 for (size_t i = 0; i < layers.size() && i < maxSquashedLayerIndex; ++i) { | 2144 for (size_t i = 0; i < layers.size() && i < maxSquashedLayerIndex; ++i) { |
2159 if (layoutObject->isDescendantOf(layers[i].paintLayer->layoutObject())) | 2145 if (layoutObject->isDescendantOf(layers[i].paintLayer->layoutObject())) |
2160 return &layers[i]; | 2146 return &layers[i]; |
2161 } | 2147 } |
2162 return nullptr; | 2148 return nullptr; |
2163 } | 2149 } |
2164 | 2150 |
2165 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer(co
nst LayoutObject* layoutObject, unsigned maxSquashedLayerIndex) | 2151 const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer(co
nst LayoutObject* layoutObject, unsigned maxSquashedLayerIndex) |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2654 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2640 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2655 name = "Scrolling Contents Layer"; | 2641 name = "Scrolling Contents Layer"; |
2656 } else { | 2642 } else { |
2657 ASSERT_NOT_REACHED(); | 2643 ASSERT_NOT_REACHED(); |
2658 } | 2644 } |
2659 | 2645 |
2660 return name; | 2646 return name; |
2661 } | 2647 } |
2662 | 2648 |
2663 } // namespace blink | 2649 } // namespace blink |
OLD | NEW |