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

Side by Side Diff: include/effects/SkMatrixConvolutionImageFilter.h

Issue 920513003: Make filters use SkImage instead of SkBitmap Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | « include/effects/SkMagnifierImageFilter.h ('k') | include/effects/SkMergeImageFilter.h » ('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 2012 The Android Open Source Project 2 * Copyright 2012 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 SkMatrixConvolutionImageFilter_DEFINED 8 #ifndef SkMatrixConvolutionImageFilter_DEFINED
9 #define SkMatrixConvolutionImageFilter_DEFINED 9 #define SkMatrixConvolutionImageFilter_DEFINED
10 10
11 #include "SkImageFilter.h" 11 #include "SkImageFilter.h"
12 #include "SkScalar.h" 12 #include "SkScalar.h"
13 #include "SkSize.h" 13 #include "SkSize.h"
14 #include "SkPoint.h" 14 #include "SkPoint.h"
15 15
16 class SkBitmap;
17
16 /*! \class SkMatrixConvolutionImageFilter 18 /*! \class SkMatrixConvolutionImageFilter
17 Matrix convolution image filter. This filter applies an NxM image 19 Matrix convolution image filter. This filter applies an NxM image
18 processing kernel to a given input image. This can be used to produce 20 processing kernel to a given input image. This can be used to produce
19 effects such as sharpening, blurring, edge detection, etc. 21 effects such as sharpening, blurring, edge detection, etc.
20 */ 22 */
21 23
22 class SK_API SkMatrixConvolutionImageFilter : public SkImageFilter { 24 class SK_API SkMatrixConvolutionImageFilter : public SkImageFilter {
23 public: 25 public:
24 /*! \enum TileMode */ 26 /*! \enum TileMode */
25 enum TileMode { 27 enum TileMode {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 const SkScalar* kernel, 72 const SkScalar* kernel,
71 SkScalar gain, 73 SkScalar gain,
72 SkScalar bias, 74 SkScalar bias,
73 const SkIPoint& kernelOffset, 75 const SkIPoint& kernelOffset,
74 TileMode tileMode, 76 TileMode tileMode,
75 bool convolveAlpha, 77 bool convolveAlpha,
76 SkImageFilter* input, 78 SkImageFilter* input,
77 const CropRect* cropRect); 79 const CropRect* cropRect);
78 void flatten(SkWriteBuffer&) const SK_OVERRIDE; 80 void flatten(SkWriteBuffer&) const SK_OVERRIDE;
79 81
80 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, 82 virtual bool onFilterImage(Proxy*, const SkImage* src, const Context&,
81 SkBitmap* result, SkIPoint* loc) const SK_OVERRID E; 83 SkAutoTUnref<const SkImage>& result, SkIPoint* lo c) const SK_OVERRIDE;
82 bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const SK_OVER RIDE; 84 bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const SK_OVER RIDE;
83 85
84 86
85 #if SK_SUPPORT_GPU 87 #if SK_SUPPORT_GPU
86 virtual bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const Sk Matrix&, 88 virtual bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const Sk Matrix&,
87 const SkIRect& bounds) const SK_OVERRIDE; 89 const SkIRect& bounds) const SK_OVERRIDE;
88 #endif 90 #endif
89 91
90 private: 92 private:
91 SkISize fKernelSize; 93 SkISize fKernelSize;
(...skipping 19 matching lines...) Expand all
111 SkBitmap* result, 113 SkBitmap* result,
112 const SkIRect& rect, 114 const SkIRect& rect,
113 const SkIRect& bounds) const; 115 const SkIRect& bounds) const;
114 void filterBorderPixels(const SkBitmap& src, 116 void filterBorderPixels(const SkBitmap& src,
115 SkBitmap* result, 117 SkBitmap* result,
116 const SkIRect& rect, 118 const SkIRect& rect,
117 const SkIRect& bounds) const; 119 const SkIRect& bounds) const;
118 }; 120 };
119 121
120 #endif 122 #endif
OLDNEW
« no previous file with comments | « include/effects/SkMagnifierImageFilter.h ('k') | include/effects/SkMergeImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698