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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 1517693002: Accelerated filters should filter unpadded primitives. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Do background rect outsetting before window intersection Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 2225 matching lines...) Expand 10 before | Expand all | Expand 10 after
2236 // Reflections are implemented with Layers that hang off of the reflecte d layer. However, 2236 // Reflections are implemented with Layers that hang off of the reflecte d layer. However,
2237 // the reflection layer subtree does not include the subtree of the pare nt Layer, so 2237 // the reflection layer subtree does not include the subtree of the pare nt Layer, so
2238 // a recursive computation of stacking children yields no results. This breaks cases when there are stacking 2238 // a recursive computation of stacking children yields no results. This breaks cases when there are stacking
2239 // children of the parent, that need to be included in reflected composi ted bounds. 2239 // children of the parent, that need to be included in reflected composi ted bounds.
2240 // Fix this by including composited bounds of stacking children of the r eflected Layer. 2240 // Fix this by including composited bounds of stacking children of the r eflected Layer.
2241 if (hasCompositedLayerMapping() && parent() && parent()->reflectionInfo( ) && parent()->reflectionInfo()->reflectionLayer() == this) 2241 if (hasCompositedLayerMapping() && parent() && parent()->reflectionInfo( ) && parent()->reflectionInfo()->reflectionLayer() == this)
2242 expandRectForReflectionAndStackingChildren(parent(), result); 2242 expandRectForReflectionAndStackingChildren(parent(), result);
2243 else 2243 else
2244 expandRectForReflectionAndStackingChildren(this, result); 2244 expandRectForReflectionAndStackingChildren(this, result);
2245 2245
2246 // FIXME: We can optimize the size of the composited layers, by not enla rging 2246 // Only enlarge by the filter outsets if we know the filter is going to be rendered in software.
2247 // filtered areas with the outsets if we know that the filter is going t o render in hardware. 2247 // Accelerated filters will handle their own outsets.
2248 // https://bugs.webkit.org/show_bug.cgi?id=81239 2248 if (paintsWithFilters()) {
2249 result.expand(filterOutsets()); 2249 result.expand(filterOutsets());
2250 }
2250 } 2251 }
2251 2252
2252 if (transform() && paintsWithTransform(GlobalPaintNormalPhase) && (this != a ncestorLayer || options == MaybeIncludeTransformForAncestorLayer)) 2253 if (transform() && paintsWithTransform(GlobalPaintNormalPhase) && (this != a ncestorLayer || options == MaybeIncludeTransformForAncestorLayer))
2253 result = transform()->mapRect(result); 2254 result = transform()->mapRect(result);
2254 2255
2255 if (enclosingPaginationLayer()) { 2256 if (enclosingPaginationLayer()) {
2256 convertFromFlowThreadToVisualBoundingBoxInAncestor(this, ancestorLayer, result); 2257 convertFromFlowThreadToVisualBoundingBoxInAncestor(this, ancestorLayer, result);
2257 return result; 2258 return result;
2258 } 2259 }
2259 LayoutPoint delta; 2260 LayoutPoint delta;
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
2830 2831
2831 void showLayerTree(const blink::LayoutObject* layoutObject) 2832 void showLayerTree(const blink::LayoutObject* layoutObject)
2832 { 2833 {
2833 if (!layoutObject) { 2834 if (!layoutObject) {
2834 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2835 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2835 return; 2836 return;
2836 } 2837 }
2837 showLayerTree(layoutObject->enclosingLayer()); 2838 showLayerTree(layoutObject->enclosingLayer());
2838 } 2839 }
2839 #endif 2840 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698