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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.h

Issue 1376473002: Move feConvolveMatrix error handling to FEConvolveMatrix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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) 2010 Zoltan Herczeg <zherczeg@webkit.org> 5 * Copyright (C) 2010 Zoltan Herczeg <zherczeg@webkit.org>
6 * Copyright (C) 2013 Google Inc. All rights reserved. 6 * Copyright (C) 2013 Google Inc. 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 26 matching lines...) Expand all
37 EDGEMODE_DUPLICATE = 1, 37 EDGEMODE_DUPLICATE = 1,
38 EDGEMODE_WRAP = 2, 38 EDGEMODE_WRAP = 2,
39 EDGEMODE_NONE = 3 39 EDGEMODE_NONE = 3
40 }; 40 };
41 41
42 class PLATFORM_EXPORT FEConvolveMatrix : public FilterEffect { 42 class PLATFORM_EXPORT FEConvolveMatrix : public FilterEffect {
43 public: 43 public:
44 static PassRefPtrWillBeRawPtr<FEConvolveMatrix> create(Filter*, const IntSiz e&, 44 static PassRefPtrWillBeRawPtr<FEConvolveMatrix> create(Filter*, const IntSiz e&,
45 float, float, const IntPoint&, EdgeModeType, bool, const Vector<float>&) ; 45 float, float, const IntPoint&, EdgeModeType, bool, const Vector<float>&) ;
46 46
47 IntSize kernelSize() const;
48 void setKernelSize(const IntSize&);
49
50 const Vector<float>& kernel() const;
51 void setKernel(const Vector<float>&);
52
53 float divisor() const;
54 bool setDivisor(float); 47 bool setDivisor(float);
55
56 float bias() const;
57 bool setBias(float); 48 bool setBias(float);
58
59 IntPoint targetOffset() const;
60 bool setTargetOffset(const IntPoint&); 49 bool setTargetOffset(const IntPoint&);
61
62 EdgeModeType edgeMode() const;
63 bool setEdgeMode(EdgeModeType); 50 bool setEdgeMode(EdgeModeType);
64
65 bool preserveAlpha() const;
66 bool setPreserveAlpha(bool); 51 bool setPreserveAlpha(bool);
67 52
68 PassRefPtr<SkImageFilter> createImageFilter(SkiaImageFilterBuilder*) overrid e; 53 PassRefPtr<SkImageFilter> createImageFilter(SkiaImageFilterBuilder*) overrid e;
69 54
70 FloatRect mapPaintRect(const FloatRect&, bool forward = true) final; 55 FloatRect mapPaintRect(const FloatRect&, bool forward = true) final;
71 56
72 TextStream& externalRepresentation(TextStream&, int indention) const overrid e; 57 TextStream& externalRepresentation(TextStream&, int indention) const overrid e;
73 58
74 private: 59 private:
75 FEConvolveMatrix(Filter*, const IntSize&, float, float, 60 FEConvolveMatrix(Filter*, const IntSize&, float, float,
76 const IntPoint&, EdgeModeType, bool, const Vector<float>&); 61 const IntPoint&, EdgeModeType, bool, const Vector<float>&);
77 62
63 bool parametersValid() const;
64
78 IntSize m_kernelSize; 65 IntSize m_kernelSize;
79 float m_divisor; 66 float m_divisor;
80 float m_bias; 67 float m_bias;
81 IntPoint m_targetOffset; 68 IntPoint m_targetOffset;
82 EdgeModeType m_edgeMode; 69 EdgeModeType m_edgeMode;
83 bool m_preserveAlpha; 70 bool m_preserveAlpha;
84 Vector<float> m_kernelMatrix; 71 Vector<float> m_kernelMatrix;
85 }; 72 };
86 73
87 } // namespace blink 74 } // namespace blink
88 75
89 #endif // FEConvolveMatrix_h 76 #endif // FEConvolveMatrix_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698