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

Side by Side Diff: Source/WebCore/platform/graphics/filters/FEMorphology.cpp

Issue 8082012: Merge 96151 - Rapidly refreshing a feMorphology[erode] with r=0 can sometimes cause display corru... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 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 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 FilterEffect* in = inputEffect(0); 200 FilterEffect* in = inputEffect(0);
201 in->apply(); 201 in->apply();
202 if (!in->hasResult()) 202 if (!in->hasResult())
203 return; 203 return;
204 204
205 ByteArray* dstPixelArray = createPremultipliedImageResult(); 205 ByteArray* dstPixelArray = createPremultipliedImageResult();
206 if (!dstPixelArray) 206 if (!dstPixelArray)
207 return; 207 return;
208 208
209 setIsAlphaImage(in->isAlphaImage()); 209 setIsAlphaImage(in->isAlphaImage());
210 if (m_radiusX <= 0 || m_radiusY <= 0) 210 if (m_radiusX <= 0 || m_radiusY <= 0) {
211 dstPixelArray->clear();
211 return; 212 return;
213 }
212 214
213 Filter* filter = this->filter(); 215 Filter* filter = this->filter();
214 int radiusX = static_cast<int>(floorf(filter->applyHorizontalScale(m_radiusX ))); 216 int radiusX = static_cast<int>(floorf(filter->applyHorizontalScale(m_radiusX )));
215 int radiusY = static_cast<int>(floorf(filter->applyVerticalScale(m_radiusY)) ); 217 int radiusY = static_cast<int>(floorf(filter->applyVerticalScale(m_radiusY)) );
216 218
217 IntRect effectDrawingRect = requestedRegionOfInputImageData(in->absolutePain tRect()); 219 IntRect effectDrawingRect = requestedRegionOfInputImageData(in->absolutePain tRect());
218 RefPtr<ByteArray> srcPixelArray = in->asPremultipliedImage(effectDrawingRect ); 220 RefPtr<ByteArray> srcPixelArray = in->asPremultipliedImage(effectDrawingRect );
219 221
220 PaintingData paintingData; 222 PaintingData paintingData;
221 paintingData.srcPixelArray = srcPixelArray.get(); 223 paintingData.srcPixelArray = srcPixelArray.get();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 FilterEffect::externalRepresentation(ts); 257 FilterEffect::externalRepresentation(ts);
256 ts << " operator=\"" << morphologyOperator() << "\" " 258 ts << " operator=\"" << morphologyOperator() << "\" "
257 << "radius=\"" << radiusX() << ", " << radiusY() << "\"]\n"; 259 << "radius=\"" << radiusX() << ", " << radiusY() << "\"]\n";
258 inputEffect(0)->externalRepresentation(ts, indent + 1); 260 inputEffect(0)->externalRepresentation(ts, indent + 1);
259 return ts; 261 return ts;
260 } 262 }
261 263
262 } // namespace WebCore 264 } // namespace WebCore
263 265
264 #endif // ENABLE(FILTERS) 266 #endif // ENABLE(FILTERS)
OLDNEW
« no previous file with comments | « Source/JavaScriptCore/wtf/ByteArray.h ('k') | Source/WebCore/platform/graphics/filters/FETurbulence.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698