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

Side by Side Diff: Source/platform/graphics/filters/FEGaussianBlur.cpp

Issue 99103006: Moving GraphicsContext and dependencies from core to platform. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final patch - fixes Android Created 7 years 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 | Annotate | Revision Log
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) 2010 Igalia, S.L. 6 * Copyright (C) 2010 Igalia, S.L.
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * Copyright (C) 2013 Google Inc. All rights reserved. 8 * Copyright (C) 2013 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Library General Public 11 * modify it under the terms of the GNU Library General Public
12 * License as published by the Free Software Foundation; either 12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version. 13 * version 2 of the License, or (at your option) any later version.
14 * 14 *
15 * This library is distributed in the hope that it will be useful, 15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Library General Public License for more details. 18 * Library General Public License for more details.
19 * 19 *
20 * You should have received a copy of the GNU Library General Public License 20 * You should have received a copy of the GNU Library General Public License
21 * along with this library; see the file COPYING.LIB. If not, write to 21 * along with this library; see the file COPYING.LIB. If not, write to
22 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 * Boston, MA 02110-1301, USA. 23 * Boston, MA 02110-1301, USA.
24 */ 24 */
25 25
26 #include "config.h" 26 #include "config.h"
27 27
28 #include "core/platform/graphics/filters/FEGaussianBlur.h" 28 #include "platform/graphics/filters/FEGaussianBlur.h"
29 29
30 #include "core/platform/graphics/GraphicsContext.h" 30 #include "platform/graphics/GraphicsContext.h"
31 #include "core/platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h" 31 #include "platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h"
32 #include "core/platform/graphics/filters/ParallelJobs.h" 32 #include "platform/graphics/filters/ParallelJobs.h"
33 #include "core/platform/graphics/filters/SkiaImageFilterBuilder.h" 33 #include "platform/graphics/filters/SkiaImageFilterBuilder.h"
34 #include "platform/text/TextStream.h" 34 #include "platform/text/TextStream.h"
35 #include "wtf/MathExtras.h" 35 #include "wtf/MathExtras.h"
36 #include "wtf/Uint8ClampedArray.h" 36 #include "wtf/Uint8ClampedArray.h"
37 37
38 #include "SkBlurImageFilter.h" 38 #include "SkBlurImageFilter.h"
39 39
40 using namespace std; 40 using namespace std;
41 41
42 static inline float gaussianKernelFactor() 42 static inline float gaussianKernelFactor()
43 { 43 {
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 return ts; 354 return ts;
355 } 355 }
356 356
357 float FEGaussianBlur::calculateStdDeviation(float radius) 357 float FEGaussianBlur::calculateStdDeviation(float radius)
358 { 358 {
359 // Blur radius represents 2/3 times the kernel size, the dest pixel is half of the radius applied 3 times 359 // Blur radius represents 2/3 times the kernel size, the dest pixel is half of the radius applied 3 times
360 return max((radius * 2 / 3.f - 0.5f) / gaussianKernelFactor(), 0.f); 360 return max((radius * 2 / 3.f - 0.5f) / gaussianKernelFactor(), 0.f);
361 } 361 }
362 362
363 } // namespace WebCore 363 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/platform/graphics/filters/FEGaussianBlur.h ('k') | Source/platform/graphics/filters/Filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698