OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 The Android Open Source Project | 2 * Copyright 2013 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 SkResizeImageFilter_DEFINED | 8 #ifndef SkResizeImageFilter_DEFINED |
9 #define SkResizeImageFilter_DEFINED | 9 #define SkResizeImageFilter_DEFINED |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 * @param sx The x scale parameter to apply when resizing. | 25 * @param sx The x scale parameter to apply when resizing. |
26 * @param sy The y scale parameter to apply when resizing. | 26 * @param sy The y scale parameter to apply when resizing. |
27 * @param filterLevel The quality of filtering to apply when scaling. | 27 * @param filterLevel The quality of filtering to apply when scaling. |
28 * @param input The input image filter. If NULL, the src bitmap | 28 * @param input The input image filter. If NULL, the src bitmap |
29 * passed to filterImage() is used instead. | 29 * passed to filterImage() is used instead. |
30 */ | 30 */ |
31 | 31 |
32 SkResizeImageFilter(SkScalar sx, SkScalar sy, SkPaint::FilterLevel filterLev
el, | 32 SkResizeImageFilter(SkScalar sx, SkScalar sy, SkPaint::FilterLevel filterLev
el, |
33 SkImageFilter* input = NULL); | 33 SkImageFilter* input = NULL); |
34 virtual ~SkResizeImageFilter(); | 34 virtual ~SkResizeImageFilter(); |
| 35 virtual void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE; |
35 | 36 |
36 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkResizeImageFilter) | 37 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkResizeImageFilter) |
37 | 38 |
38 protected: | 39 protected: |
39 SkResizeImageFilter(SkReadBuffer& buffer); | 40 SkResizeImageFilter(SkReadBuffer& buffer); |
40 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 41 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
41 | 42 |
42 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, | 43 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, |
43 SkBitmap* result, SkIPoint* loc) const SK_OVERRID
E; | 44 SkBitmap* result, SkIPoint* loc) const SK_OVERRID
E; |
| 45 virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, |
| 46 SkIRect* dst) const SK_OVERRIDE; |
44 | 47 |
45 private: | 48 private: |
46 SkScalar fSx, fSy; | 49 SkScalar fSx, fSy; |
47 SkPaint::FilterLevel fFilterLevel; | 50 SkPaint::FilterLevel fFilterLevel; |
48 typedef SkImageFilter INHERITED; | 51 typedef SkImageFilter INHERITED; |
49 }; | 52 }; |
50 | 53 |
51 #endif | 54 #endif |
OLD | NEW |