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

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

Issue 354223002: Add methods to RenderLayer to get at the painting or scrolling graphics layers, if present. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Edited comments. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/web/LinkHighlight.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 d527762e5dcfe58dffdcd23260a92f0a65e73fc7..7cfdaed01cfbd34a6b52f1089c9fcd3e87517071 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -3338,6 +3338,30 @@ CompositedLayerMappingPtr RenderLayer::compositedLayerMapping() const
return m_compositedLayerMapping.get();
}
+GraphicsLayer* RenderLayer::graphicsLayerBacking() const
+{
+ switch (compositingState()) {
+ case NotComposited:
+ return 0;
+ case PaintsIntoGroupedBacking:
+ return groupedMapping()->squashingLayer();
+ default:
+ return compositedLayerMapping()->mainGraphicsLayer();
+ }
+}
+
+GraphicsLayer* RenderLayer::graphicsLayerBackingForScrolling() const
+{
+ switch (compositingState()) {
+ case NotComposited:
+ return 0;
+ case PaintsIntoGroupedBacking:
+ return groupedMapping()->squashingLayer();
+ default:
+ return compositedLayerMapping()->scrollingContentsLayer() ? compositedLayerMapping()->scrollingContentsLayer() : compositedLayerMapping()->mainGraphicsLayer();
+ }
+}
+
CompositedLayerMappingPtr RenderLayer::ensureCompositedLayerMapping()
{
if (!m_compositedLayerMapping) {
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/web/LinkHighlight.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698