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

Unified Diff: Source/core/rendering/RenderLayer.cpp

Issue 20103002: Make composited scrolling codepaths co-operate. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index ae12437c9cdef7f295937445478a217fd6ffad36..1ea81a6c0a4499ba5d2b13adeccdcb2faf6567e4 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -495,6 +495,26 @@ bool RenderLayer::acceleratedCompositingForOverflowScrollEnabled() const
return settings && settings->acceleratedCompositingForOverflowScrollEnabled();
}
+bool RenderLayer::useCompositorDrivenAcceleratedScrolling() const
+{
+ TRACE_EVENT0("comp-scroll", "RenderLayer::useCompositorDrivenAcceleratedScrolling");
+
+ if (!compositorDrivenAcceleratedScrollingEnabled())
+ return false;
+
+ const RenderLayer* scrollingLayer = ancestorScrollingLayer();
+ if (!scrollingLayer || scrollingLayer->isStackingContainer())
+ return false;
+
+ if (scrollingLayer->m_canBePromotedToStackingContainerDirty) {
Ian Vollick 2013/08/08 03:30:10 Can you describe how we get into the situation whe
hartmanng 2013/08/08 13:41:37 The situation I ran into looks like this: [0x7f7
+ // We don't know if it's safe to promote to stacking container, and
+ // aren't in a position to find out, so we have to assume the worst.
+ return true;
+ }
+
+ return !scrollingLayer->canBeStackingContainer();
+}
+
// FIXME: This is a temporary flag and should be removed once accelerated
// overflow scroll is ready (crbug.com/254111).
bool RenderLayer::compositorDrivenAcceleratedScrollingEnabled() const
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698