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

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

Issue 2319293004: Replace FilterEffect::maxEffectRect() with absoluteBounds() (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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 if (m_k4 == k4) 110 if (m_k4 == k4)
111 return false; 111 return false;
112 m_k4 = k4; 112 m_k4 = k4;
113 return true; 113 return true;
114 } 114 }
115 115
116 FloatRect FEComposite::determineAbsolutePaintRect(const FloatRect& originalReque stedRect) 116 FloatRect FEComposite::determineAbsolutePaintRect(const FloatRect& originalReque stedRect)
117 { 117 {
118 FloatRect requestedRect = originalRequestedRect; 118 FloatRect requestedRect = originalRequestedRect;
119 if (clipsToBounds()) 119 if (clipsToBounds())
120 requestedRect.intersect(maxEffectRect()); 120 requestedRect.intersect(absoluteBounds());
121 121
122 // We may be called multiple times if result is used more than once. Return 122 // We may be called multiple times if result is used more than once. Return
123 // quickly if nothing new is required. 123 // quickly if nothing new is required.
124 if (absolutePaintRect().contains(enclosingIntRect(requestedRect))) 124 if (absolutePaintRect().contains(enclosingIntRect(requestedRect)))
125 return requestedRect; 125 return requestedRect;
126 126
127 // No mapPaintRect required for FEComposite. 127 // No mapPaintRect required for FEComposite.
128 FloatRect input1Rect = inputEffect(1)->determineAbsolutePaintRect(requestedR ect); 128 FloatRect input1Rect = inputEffect(1)->determineAbsolutePaintRect(requestedR ect);
129 FloatRect affectedRect; 129 FloatRect affectedRect;
130 switch (m_type) { 130 switch (m_type) {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 ts << " operation=\"" << m_type << "\""; 253 ts << " operation=\"" << m_type << "\"";
254 if (m_type == FECOMPOSITE_OPERATOR_ARITHMETIC) 254 if (m_type == FECOMPOSITE_OPERATOR_ARITHMETIC)
255 ts << " k1=\"" << m_k1 << "\" k2=\"" << m_k2 << "\" k3=\"" << m_k3 << "\ " k4=\"" << m_k4 << "\""; 255 ts << " k1=\"" << m_k1 << "\" k2=\"" << m_k2 << "\" k3=\"" << m_k3 << "\ " k4=\"" << m_k4 << "\"";
256 ts << "]\n"; 256 ts << "]\n";
257 inputEffect(0)->externalRepresentation(ts, indent + 1); 257 inputEffect(0)->externalRepresentation(ts, indent + 1);
258 inputEffect(1)->externalRepresentation(ts, indent + 1); 258 inputEffect(1)->externalRepresentation(ts, indent + 1);
259 return ts; 259 return ts;
260 } 260 }
261 261
262 } // namespace blink 262 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698