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

Side by Side Diff: src/core/SkMatrixImageFilter.h

Issue 1847953003: Switch SkMatrixImageFilter over to new onFilterImage interface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Uninline Create method Created 4 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
« no previous file with comments | « no previous file | src/core/SkMatrixImageFilter.cpp » ('j') | 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 2014 The Android Open Source Project 2 * Copyright 2014 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkMatrixImageFilter_DEFINED 8 #ifndef SkMatrixImageFilter_DEFINED
9 #define SkMatrixImageFilter_DEFINED 9 #define SkMatrixImageFilter_DEFINED
10 10
11 #include "SkImageFilter.h" 11 #include "SkImageFilter.h"
12 #include "SkScalar.h" 12 #include "SkMatrix.h"
13 #include "SkSize.h"
14 #include "SkPoint.h"
15 #include "SkPaint.h"
16 13
17 /*! \class SkMatrixImageFilter 14 /*! \class SkMatrixImageFilter
18 Matrix transformation image filter. This filter draws its source 15 Matrix transformation image filter. This filter draws its source
19 input transformed by the given matrix. 16 input transformed by the given matrix.
20 */ 17 */
21 18
22 class SK_API SkMatrixImageFilter : public SkImageFilter { 19 class SK_API SkMatrixImageFilter : public SkImageFilter {
23 public: 20 public:
24 /** Construct a 2D transformation image filter. 21 /** Construct a 2D transformation image filter.
25 * @param transform The matrix to apply when drawing the src bitmap 22 * @param transform The matrix to apply when drawing the src bitmap
26 * @param filterLevel The quality of filtering to apply when scaling. 23 * @param filterQuality The quality of filtering to apply when scaling.
27 * @param input The input image filter. If nullptr, the src bitmap 24 * @param input The input image filter. If nullptr, the src bitmap
28 * passed to filterImage() is used instead. 25 * passed to filterImage() is used instead.
29 */ 26 */
30 27
31 static SkMatrixImageFilter* Create(const SkMatrix& transform, 28 static SkMatrixImageFilter* Create(const SkMatrix& transform,
32 SkFilterQuality, 29 SkFilterQuality filterQuality,
33 SkImageFilter* input = nullptr); 30 SkImageFilter* input = nullptr);
34 virtual ~SkMatrixImageFilter();
35 31
36 SkRect computeFastBounds(const SkRect&) const override; 32 SkRect computeFastBounds(const SkRect&) const override;
37 33
38 SK_TO_STRING_OVERRIDE() 34 SK_TO_STRING_OVERRIDE()
39 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixImageFilter) 35 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixImageFilter)
40 36
41 protected: 37 protected:
42 SkMatrixImageFilter(const SkMatrix& transform, 38 SkMatrixImageFilter(const SkMatrix& transform,
43 SkFilterQuality, 39 SkFilterQuality,
44 SkImageFilter* input); 40 SkImageFilter* input);
45 void flatten(SkWriteBuffer&) const override; 41 void flatten(SkWriteBuffer&) const override;
46 42
47 bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&, 43 sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&,
48 SkBitmap* result, SkIPoint* loc) const override ; 44 SkIPoint* offset) const override;
49 SkIRect onFilterNodeBounds(const SkIRect& src, const SkMatrix&, MapDirection ) const override; 45 SkIRect onFilterNodeBounds(const SkIRect& src, const SkMatrix&, MapDirection ) const override;
50 46
51 private: 47 private:
52 SkMatrix fTransform; 48 SkMatrix fTransform;
53 SkFilterQuality fFilterQuality; 49 SkFilterQuality fFilterQuality;
54 typedef SkImageFilter INHERITED; 50 typedef SkImageFilter INHERITED;
55 }; 51 };
56 52
57 #endif 53 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkMatrixImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698