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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp

Issue 2314923002: Remove PathOpsSVGClipping runtime flag (status=stable) (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org>
4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
5 * Copyright (C) 2011 Dirk Schulze <krit@webkit.org> 5 * Copyright (C) 2011 Dirk Schulze <krit@webkit.org>
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 toSVGGeometryElement(childElement)->toClipPath(m_clipContentPath ); 101 toSVGGeometryElement(childElement)->toClipPath(m_clipContentPath );
102 else if (isSVGUseElement(childElement)) 102 else if (isSVGUseElement(childElement))
103 toSVGUseElement(childElement)->toClipPath(m_clipContentPath); 103 toSVGUseElement(childElement)->toClipPath(m_clipContentPath);
104 104
105 continue; 105 continue;
106 } 106 }
107 107
108 // Multiple shapes require PathOps. In some degenerate cases PathOps can exhibit quadratic 108 // Multiple shapes require PathOps. In some degenerate cases PathOps can exhibit quadratic
109 // behavior, so we cap the number of ops to a reasonable count. 109 // behavior, so we cap the number of ops to a reasonable count.
110 const unsigned kMaxOps = 42; 110 const unsigned kMaxOps = 42;
111 if (!RuntimeEnabledFeatures::pathOpsSVGClippingEnabled() || ++opCount > kMaxOps) { 111 if (++opCount > kMaxOps) {
112 m_clipContentPath.clear(); 112 m_clipContentPath.clear();
113 return false; 113 return false;
114 } 114 }
115 115
116 // Second clip shape => start using the builder. 116 // Second clip shape => start using the builder.
117 if (!usingBuilder) { 117 if (!usingBuilder) {
118 clipPathBuilder.add(m_clipContentPath.getSkPath(), kUnion_SkPathOp); 118 clipPathBuilder.add(m_clipContentPath.getSkPath(), kUnion_SkPathOp);
119 usingBuilder = true; 119 usingBuilder = true;
120 } 120 }
121 121
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 275
276 AffineTransform transform = toSVGClipPathElement(element())->calculateAnimat edLocalTransform(); 276 AffineTransform transform = toSVGClipPathElement(element())->calculateAnimat edLocalTransform();
277 if (clipPathUnits() == SVGUnitTypes::kSvgUnitTypeObjectboundingbox) { 277 if (clipPathUnits() == SVGUnitTypes::kSvgUnitTypeObjectboundingbox) {
278 transform.translate(referenceBox.x(), referenceBox.y()); 278 transform.translate(referenceBox.x(), referenceBox.y());
279 transform.scaleNonUniform(referenceBox.width(), referenceBox.height()); 279 transform.scaleNonUniform(referenceBox.width(), referenceBox.height());
280 } 280 }
281 return transform.mapRect(m_localClipBounds); 281 return transform.mapRect(m_localClipBounds);
282 } 282 }
283 283
284 } // namespace blink 284 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698