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

Unified Diff: Source/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 205343009: Hoist compositorDrivenAcceleratedScrollingEnabled check out of scrollParent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/compositing/CompositedLayerMapping.cpp
diff --git a/Source/core/rendering/compositing/CompositedLayerMapping.cpp b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
index 592739d51bfde55c970559e0f205bcec517f5235..9d6506a6c5f7cc039ceeded88001bd148ee899e5 100644
--- a/Source/core/rendering/compositing/CompositedLayerMapping.cpp
+++ b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
@@ -479,7 +479,7 @@ bool CompositedLayerMapping::updateGraphicsLayerConfiguration()
if (m_owningLayer.needsCompositedScrolling())
needsDescendentsClippingLayer = false;
- RenderLayer* scrollParent = m_owningLayer.scrollParent();
+ RenderLayer* scrollParent = renderer->compositorDrivenAcceleratedScrollingEnabled() ? m_owningLayer.scrollParent() : 0;
bool needsAncestorClip = compositor->clippedByAncestor(&m_owningLayer);
if (scrollParent) {
// If our containing block is our ancestor scrolling layer, then we'll already be clipped
@@ -901,7 +901,7 @@ GraphicsLayerUpdater::UpdateType CompositedLayerMapping::updateGraphicsLayerGeom
updateRenderingContext();
updateShouldFlattenTransform();
updateChildrenTransform();
- updateScrollParent(m_owningLayer.scrollParent());
+ updateScrollParent(renderer()->compositorDrivenAcceleratedScrollingEnabled() ? m_owningLayer.scrollParent() : 0);
registerScrollingLayers();
updateCompositingReasons();
@@ -1428,7 +1428,7 @@ static void updateScrollParentForGraphicsLayer(GraphicsLayer* layer, GraphicsLay
void CompositedLayerMapping::updateScrollParent(RenderLayer* scrollParent)
{
- if (!scrollParent && m_squashedLayers.size())
+ if (!scrollParent && m_squashedLayers.size() && renderer()->compositorDrivenAcceleratedScrollingEnabled())
scrollParent = m_squashedLayers[0].renderLayer->scrollParent();
if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(m_owningLayer)) {
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/compositing/CompositingReasonFinder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698