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

Unified Diff: Source/core/svg/graphics/filters/SVGFilter.cpp

Issue 1348973004: Merge SVGFilter into Filter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Nits. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/graphics/filters/SVGFilter.h ('k') | Source/platform/graphics/filters/Filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/graphics/filters/SVGFilter.cpp
diff --git a/Source/core/svg/graphics/filters/SVGFilter.cpp b/Source/core/svg/graphics/filters/SVGFilter.cpp
deleted file mode 100644
index 892ff553055d1c016c77f5daf788210e2aefe361..0000000000000000000000000000000000000000
--- a/Source/core/svg/graphics/filters/SVGFilter.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
- * Copyright (C) Research In Motion Limited 2010. All rights reserved.
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "core/svg/graphics/filters/SVGFilter.h"
-
-namespace blink {
-
-SVGFilter::SVGFilter(const FloatRect& referenceBox, const FloatRect& filterRegion, bool effectBBoxMode)
- : Filter(referenceBox, filterRegion, 1.0f)
- , m_effectBBoxMode(effectBBoxMode)
-{
-}
-
-float SVGFilter::applyHorizontalScale(float value) const
-{
- if (m_effectBBoxMode)
- value *= referenceBox().width();
- return Filter::applyHorizontalScale(value);
-}
-
-float SVGFilter::applyVerticalScale(float value) const
-{
- if (m_effectBBoxMode)
- value *= referenceBox().height();
- return Filter::applyVerticalScale(value);
-}
-
-FloatPoint3D SVGFilter::resolve3dPoint(const FloatPoint3D& point) const
-{
- if (!m_effectBBoxMode)
- return point;
- return FloatPoint3D(point.x() * referenceBox().width() + referenceBox().x(),
- point.y() * referenceBox().height() + referenceBox().y(),
- point.z() * sqrtf(referenceBox().size().diagonalLengthSquared() / 2));
-}
-
-PassRefPtrWillBeRawPtr<SVGFilter> SVGFilter::create(const FloatRect& referenceBox, const FloatRect& filterRegion, bool effectBBoxMode)
-{
- return adoptRefWillBeNoop(new SVGFilter(referenceBox, filterRegion, effectBBoxMode));
-}
-
-} // namespace blink
« no previous file with comments | « Source/core/svg/graphics/filters/SVGFilter.h ('k') | Source/platform/graphics/filters/Filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698