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

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

Issue 13462003: Add support for accelerated fixed root background (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@background-attachment-fixed2
Patch Set: . Created 7 years, 5 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/page/scrolling/ScrollingCoordinator.cpp ('k') | Source/core/rendering/RenderLayerBacking.h » ('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 a0e473550efdb477530b6934bc037f101901eafe..7baf7edc03eaaca5837c346f513afc3b1025e21a 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -3496,15 +3496,21 @@ static inline bool shouldSuppressPaintingLayer(RenderLayer* layer)
return false;
}
+static bool paintForFixedRootBackground(const RenderLayer* layer, RenderLayer::PaintLayerFlags paintFlags)
+{
+ return layer->renderer()->isRoot() && (paintFlags & RenderLayer::PaintLayerPaintingRootBackgroundOnly);
+}
+
void RenderLayer::paintLayer(GraphicsContext* context, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags)
{
if (isComposited()) {
// The updatingControlTints() painting pass goes through compositing layers,
// but we need to ensure that we don't cache clip rects computed with the wrong root in this case.
- if (context->updatingControlTints() || (paintingInfo.paintBehavior & PaintBehaviorFlattenCompositingLayers))
+ if (context->updatingControlTints() || (paintingInfo.paintBehavior & PaintBehaviorFlattenCompositingLayers)) {
paintFlags |= PaintLayerTemporaryClipRects;
- else if (!backing()->paintsIntoCompositedAncestor()
- && !shouldDoSoftwarePaint(this, paintFlags & PaintLayerPaintingReflection)) {
+ } else if (!backing()->paintsIntoCompositedAncestor()
+ && !shouldDoSoftwarePaint(this, paintFlags & PaintLayerPaintingReflection)
+ && !paintForFixedRootBackground(this, paintFlags)) {
// If this RenderLayer should paint into its backing, that will be done via RenderLayerBacking::paintIntoLayer().
return;
}
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | Source/core/rendering/RenderLayerBacking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698