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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2051333005: Let FrameView track object paint invalidations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TrackInvalidation
Patch Set: NeedsRebaseline Created 4 years, 6 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
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 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698