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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/filters/FEDisplacementMap.cpp

Issue 2329803002: Drop FilterEffect::m_absolutePaintRect (Closed)
Patch Set: Add comment 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * Copyright (C) 2013 Google Inc. All rights reserved. 7 * Copyright (C) 2013 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 ts << "[feDisplacementMap"; 149 ts << "[feDisplacementMap";
150 FilterEffect::externalRepresentation(ts); 150 FilterEffect::externalRepresentation(ts);
151 ts << " scale=\"" << m_scale << "\" " 151 ts << " scale=\"" << m_scale << "\" "
152 << "xChannelSelector=\"" << m_xChannelSelector << "\" " 152 << "xChannelSelector=\"" << m_xChannelSelector << "\" "
153 << "yChannelSelector=\"" << m_yChannelSelector << "\"]\n"; 153 << "yChannelSelector=\"" << m_yChannelSelector << "\"]\n";
154 inputEffect(0)->externalRepresentation(ts, indent + 1); 154 inputEffect(0)->externalRepresentation(ts, indent + 1);
155 inputEffect(1)->externalRepresentation(ts, indent + 1); 155 inputEffect(1)->externalRepresentation(ts, indent + 1);
156 return ts; 156 return ts;
157 } 157 }
158 158
159 FloatRect FEDisplacementMap::determineAbsolutePaintRect(const FloatRect& request edRect) 159 FloatRect FEDisplacementMap::determineAbsolutePaintRect(const FloatRect& request edRect) const
160 { 160 {
161 FloatRect rect = requestedRect; 161 FloatRect rect = requestedRect;
162 if (clipsToBounds()) 162 if (clipsToBounds())
163 rect.intersect(absoluteBounds()); 163 rect.intersect(absoluteBounds());
164 164
165 if (absolutePaintRect().contains(enclosingIntRect(rect)))
166 return rect;
167
168 rect = mapPaintRect(rect, false); 165 rect = mapPaintRect(rect, false);
169 rect = inputEffect(0)->determineAbsolutePaintRect(rect); 166 rect = inputEffect(0)->determineAbsolutePaintRect(rect);
170 rect = mapPaintRect(rect, true); 167 rect = mapPaintRect(rect, true);
171 rect.intersect(requestedRect); 168 rect.intersect(requestedRect);
172
173 addAbsolutePaintRect(rect);
174 return rect; 169 return rect;
175 } 170 }
176 171
177 } // namespace blink 172 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698