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

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

Issue 1208023002: Removing unused methods from FEGaussianBlur class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 | « Source/platform/graphics/filters/FEGaussianBlur.h ('k') | no next file » | 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, 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
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 , m_stdX(x) 45 , m_stdX(x)
46 , m_stdY(y) 46 , m_stdY(y)
47 { 47 {
48 } 48 }
49 49
50 PassRefPtrWillBeRawPtr<FEGaussianBlur> FEGaussianBlur::create(Filter* filter, fl oat x, float y) 50 PassRefPtrWillBeRawPtr<FEGaussianBlur> FEGaussianBlur::create(Filter* filter, fl oat x, float y)
51 { 51 {
52 return adoptRefWillBeNoop(new FEGaussianBlur(filter, x, y)); 52 return adoptRefWillBeNoop(new FEGaussianBlur(filter, x, y));
53 } 53 }
54 54
55 float FEGaussianBlur::stdDeviationX() const
56 {
57 return m_stdX;
58 }
59
60 void FEGaussianBlur::setStdDeviationX(float x)
61 {
62 m_stdX = x;
63 }
64
65 float FEGaussianBlur::stdDeviationY() const
66 {
67 return m_stdY;
68 }
69
70 void FEGaussianBlur::setStdDeviationY(float y)
71 {
72 m_stdY = y;
73 }
74
75 IntSize FEGaussianBlur::calculateUnscaledKernelSize(const FloatPoint& std) 55 IntSize FEGaussianBlur::calculateUnscaledKernelSize(const FloatPoint& std)
76 { 56 {
77 ASSERT(std.x() >= 0 && std.y() >= 0); 57 ASSERT(std.x() >= 0 && std.y() >= 0);
78 58
79 IntSize kernelSize; 59 IntSize kernelSize;
80 // Limit the kernel size to 1000. A bigger radius won't make a big differenc e for the result image but 60 // Limit the kernel size to 1000. A bigger radius won't make a big differenc e for the result image but
81 // inflates the absolute paint rect to much. This is compatible with Firefox ' behavior. 61 // inflates the absolute paint rect to much. This is compatible with Firefox ' behavior.
82 if (std.x()) { 62 if (std.x()) {
83 int size = std::max<unsigned>(2, static_cast<unsigned>(floorf(std.x() * gaussianKernelFactor() + 0.5f))); 63 int size = std::max<unsigned>(2, static_cast<unsigned>(floorf(std.x() * gaussianKernelFactor() + 0.5f)));
84 kernelSize.setWidth(size); 64 kernelSize.setWidth(size);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 { 123 {
144 writeIndent(ts, indent); 124 writeIndent(ts, indent);
145 ts << "[feGaussianBlur"; 125 ts << "[feGaussianBlur";
146 FilterEffect::externalRepresentation(ts); 126 FilterEffect::externalRepresentation(ts);
147 ts << " stdDeviation=\"" << m_stdX << ", " << m_stdY << "\"]\n"; 127 ts << " stdDeviation=\"" << m_stdX << ", " << m_stdY << "\"]\n";
148 inputEffect(0)->externalRepresentation(ts, indent + 1); 128 inputEffect(0)->externalRepresentation(ts, indent + 1);
149 return ts; 129 return ts;
150 } 130 }
151 131
152 } // namespace blink 132 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/filters/FEGaussianBlur.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698