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

Side by Side Diff: Source/platform/graphics/filters/FEDisplacementMap.h

Issue 1097053004: Drop some dead code from FilterEffect (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | 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) 2013 Google Inc. All rights reserved. 5 * Copyright (C) 2013 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
11 * 11 *
12 * This library is distributed in the hope that it will be useful, 12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details. 15 * Library General Public License for more details.
16 * 16 *
17 * You should have received a copy of the GNU Library General Public License 17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to 18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA. 20 * Boston, MA 02110-1301, USA.
21 */ 21 */
22 22
23 #ifndef FEDisplacementMap_h 23 #ifndef FEDisplacementMap_h
24 #define FEDisplacementMap_h 24 #define FEDisplacementMap_h
25 25
26 #include "platform/graphics/filters/FilterEffect.h" 26 #include "platform/graphics/filters/FilterEffect.h"
27 #include "wtf/text/WTFString.h"
28 27
29 namespace blink { 28 namespace blink {
30 29
31 enum ChannelSelectorType { 30 enum ChannelSelectorType {
32 CHANNEL_UNKNOWN = 0, 31 CHANNEL_UNKNOWN = 0,
33 CHANNEL_R = 1, 32 CHANNEL_R = 1,
34 CHANNEL_G = 2, 33 CHANNEL_G = 2,
35 CHANNEL_B = 3, 34 CHANNEL_B = 3,
36 CHANNEL_A = 4 35 CHANNEL_A = 4
37 }; 36 };
38 37
39 class PLATFORM_EXPORT FEDisplacementMap : public FilterEffect { 38 class PLATFORM_EXPORT FEDisplacementMap : public FilterEffect {
40 public: 39 public:
41 static PassRefPtrWillBeRawPtr<FEDisplacementMap> create(Filter*, ChannelSele ctorType xChannelSelector, ChannelSelectorType yChannelSelector, float); 40 static PassRefPtrWillBeRawPtr<FEDisplacementMap> create(Filter*, ChannelSele ctorType xChannelSelector, ChannelSelectorType yChannelSelector, float);
42 41
43 ChannelSelectorType xChannelSelector() const; 42 ChannelSelectorType xChannelSelector() const;
44 bool setXChannelSelector(const ChannelSelectorType); 43 bool setXChannelSelector(const ChannelSelectorType);
45 44
46 ChannelSelectorType yChannelSelector() const; 45 ChannelSelectorType yChannelSelector() const;
47 bool setYChannelSelector(const ChannelSelectorType); 46 bool setYChannelSelector(const ChannelSelectorType);
48 47
49 float scale() const; 48 float scale() const;
50 bool setScale(float); 49 bool setScale(float);
51 50
52 virtual void setResultColorSpace(ColorSpace) override;
53
54 virtual FloatRect mapPaintRect(const FloatRect&, bool forward = true) overri de final; 51 virtual FloatRect mapPaintRect(const FloatRect&, bool forward = true) overri de final;
55 52
56 virtual TextStream& externalRepresentation(TextStream&, int indention) const override; 53 virtual TextStream& externalRepresentation(TextStream&, int indention) const override;
57 54
58 FloatRect determineAbsolutePaintRect(const FloatRect& requestedRect) overrid e; 55 FloatRect determineAbsolutePaintRect(const FloatRect& requestedRect) overrid e;
59 56
60 private: 57 private:
61 FEDisplacementMap(Filter*, ChannelSelectorType xChannelSelector, ChannelSele ctorType yChannelSelector, float); 58 FEDisplacementMap(Filter*, ChannelSelectorType xChannelSelector, ChannelSele ctorType yChannelSelector, float);
62 59
63 virtual PassRefPtr<SkImageFilter> createImageFilter(SkiaImageFilterBuilder*) override; 60 virtual PassRefPtr<SkImageFilter> createImageFilter(SkiaImageFilterBuilder*) override;
64 61
65 ChannelSelectorType m_xChannelSelector; 62 ChannelSelectorType m_xChannelSelector;
66 ChannelSelectorType m_yChannelSelector; 63 ChannelSelectorType m_yChannelSelector;
67 float m_scale; 64 float m_scale;
68 }; 65 };
69 66
70 } // namespace blink 67 } // namespace blink
71 68
72 #endif // FEDisplacementMap_h 69 #endif // FEDisplacementMap_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698