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

Unified Diff: sky/engine/core/rendering/RenderLayer.cpp

Issue 848243002: Remove deferredfiltersenabled settings. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/rendering/FilterEffectRenderer.cpp ('k') | sky/engine/public/web/WebSettings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderLayer.cpp
diff --git a/sky/engine/core/rendering/RenderLayer.cpp b/sky/engine/core/rendering/RenderLayer.cpp
index f56e1457b64c29e7639f7af87cbff24c56d5db92..12a0ab701c147a182e7f30fdfb4fa5bccf421503 100644
--- a/sky/engine/core/rendering/RenderLayer.cpp
+++ b/sky/engine/core/rendering/RenderLayer.cpp
@@ -987,7 +987,6 @@ void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti
}
LayerPaintingInfo localPaintingInfo(paintingInfo);
- bool deferredFiltersEnabled = renderer()->document().settings()->deferredFiltersEnabled();
FilterEffectRendererHelper filterPainter(filterRenderer() && paintsWithFilters());
LayoutRect layerBounds;
@@ -1010,7 +1009,6 @@ void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti
rootRelativeBounds = physicalBoundingBoxIncludingReflectionAndStackingChildren(paintingInfo.rootLayer, offsetFromRoot);
if (filterPainter.prepareFilterEffect(this, rootRelativeBounds, paintingInfo.paintDirtyRect)) {
-
// Rewire the old context to a memory buffer, so that we can capture the contents of the layer.
// NOTE: We saved the old context in the "transparencyLayerContext" local variable, to be able to start a transparency layer
// on the original context and avoid duplicating "beginFilterEffect" after each transparency layer call. Also, note that
@@ -1018,37 +1016,22 @@ void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti
// With deferred filters, we don't need a separate context, but we do need to do transparency and clipping before starting
// filter processing.
// FIXME: when the legacy path is removed, remove the transparencyLayerContext as well.
- if (deferredFiltersEnabled) {
- if (haveTransparency) {
- // If we have a filter and transparency, we have to eagerly start a transparency layer here, rather than risk a child layer lazily starts one after filter processing.
- beginTransparencyLayers(context, localPaintingInfo.rootLayer, paintingInfo.paintDirtyRect, paintingInfo.subPixelAccumulation);
- }
- // We'll handle clipping to the dirty rect before filter rasterization.
- // Filter processing will automatically expand the clip rect and the offscreen to accommodate any filter outsets.
- // FIXME: It is incorrect to just clip to the damageRect here once multiple fragments are involved.
- clipToRect(localPaintingInfo, context, backgroundRect);
- // Subsequent code should not clip to the dirty rect, since we've already
- // done it above, and doing it later will defeat the outsets.
- localPaintingInfo.clipToDirtyRect = false;
+ if (haveTransparency) {
+ // If we have a filter and transparency, we have to eagerly start a transparency layer here, rather than risk a child layer lazily starts one after filter processing.
+ beginTransparencyLayers(context, localPaintingInfo.rootLayer, paintingInfo.paintDirtyRect, paintingInfo.subPixelAccumulation);
}
- context = filterPainter.beginFilterEffect(context);
+ // We'll handle clipping to the dirty rect before filter rasterization.
+ // Filter processing will automatically expand the clip rect and the offscreen to accommodate any filter outsets.
+ // FIXME: It is incorrect to just clip to the damageRect here once multiple fragments are involved.
+ clipToRect(localPaintingInfo, context, backgroundRect);
+ // Subsequent code should not clip to the dirty rect, since we've already
+ // done it above, and doing it later will defeat the outsets.
+ localPaintingInfo.clipToDirtyRect = false;
- // Check that we didn't fail to allocate the graphics context for the offscreen buffer.
- if (filterPainter.hasStartedFilterEffect() && !deferredFiltersEnabled) {
- localPaintingInfo.paintDirtyRect = filterPainter.paintInvalidationRect();
- // If the filter needs the full source image, we need to avoid using the clip rectangles.
- // Otherwise, if for example this layer has overflow:hidden, a drop shadow will not compute correctly.
- // Note that we will still apply the clipping on the final rendering of the filter.
- localPaintingInfo.clipToDirtyRect = !filterRenderer()->hasFilterThatMovesPixels();
- }
+ context = filterPainter.beginFilterEffect(context);
}
}
- if (filterPainter.hasStartedFilterEffect() && haveTransparency && !deferredFiltersEnabled) {
- // If we have a filter and transparency, we have to eagerly start a transparency layer here, rather than risk a child layer lazily starts one with the wrong context.
- beginTransparencyLayers(transparencyLayerContext, localPaintingInfo.rootLayer, paintingInfo.paintDirtyRect, paintingInfo.subPixelAccumulation);
- }
-
// If this layer's renderer is a child of the paintingRoot, we render unconditionally, which
// is done by passing a nil paintingRoot down to our renderer (as if no paintingRoot was ever set).
// Else, our renderer tree may or may not contain the painting root, so we pass that root along
@@ -1078,11 +1061,6 @@ void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti
paintOverflowControls(context, localPaintingInfo, layerLocation, backgroundRect);
if (filterPainter.hasStartedFilterEffect()) {
- // Apply the correct clipping (ie. overflow: hidden).
- // FIXME: It is incorrect to just clip to the damageRect here once multiple fragments are involved.
- if (!deferredFiltersEnabled)
- clipToRect(localPaintingInfo, transparencyLayerContext, backgroundRect);
-
context = filterPainter.applyFilterEffect();
restoreClip(transparencyLayerContext, localPaintingInfo.paintDirtyRect, backgroundRect);
}
« no previous file with comments | « sky/engine/core/rendering/FilterEffectRenderer.cpp ('k') | sky/engine/public/web/WebSettings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698