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

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

Issue 23295017: In image filters, apply the CTM and offset to the crop rect. This is necessary to compensate for bo… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix documentation comment. Created 7 years, 3 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
« no previous file with comments | « include/effects/SkMagnifierImageFilter.h ('k') | src/core/SkCanvas.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 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
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixConvolutionImage Filter) 55 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixConvolutionImage Filter)
56 56
57 protected: 57 protected:
58 SkMatrixConvolutionImageFilter(SkFlattenableReadBuffer& buffer); 58 SkMatrixConvolutionImageFilter(SkFlattenableReadBuffer& buffer);
59 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 59 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
60 60
61 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, 61 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
62 SkBitmap* result, SkIPoint* loc) SK_OVERRIDE; 62 SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
63 63
64 #if SK_SUPPORT_GPU 64 #if SK_SUPPORT_GPU
65 virtual bool asNewEffect(GrEffectRef** effect, GrTexture*, const SkIPoint& o ffset) const SK_OVERRIDE; 65 virtual bool asNewEffect(GrEffectRef** effect, GrTexture*, const SkMatrix& m atrix) const SK_OVERRIDE;
66 #endif 66 #endif
67 67
68 private: 68 private:
69 SkISize fKernelSize; 69 SkISize fKernelSize;
70 SkScalar* fKernel; 70 SkScalar* fKernel;
71 SkScalar fGain; 71 SkScalar fGain;
72 SkScalar fBias; 72 SkScalar fBias;
73 SkIPoint fTarget; 73 SkIPoint fTarget;
74 TileMode fTileMode; 74 TileMode fTileMode;
75 bool fConvolveAlpha; 75 bool fConvolveAlpha;
76 typedef SkImageFilter INHERITED; 76 typedef SkImageFilter INHERITED;
77 77
78 template <class PixelFetcher, bool convolveAlpha> 78 template <class PixelFetcher, bool convolveAlpha>
79 void filterPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect ); 79 void filterPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect );
80 template <class PixelFetcher> 80 template <class PixelFetcher>
81 void filterPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect ); 81 void filterPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect );
82 void filterInteriorPixels(const SkBitmap& src, SkBitmap* result, const SkIRe ct& rect); 82 void filterInteriorPixels(const SkBitmap& src, SkBitmap* result, const SkIRe ct& rect);
83 void filterBorderPixels(const SkBitmap& src, SkBitmap* result, const SkIRect & rect); 83 void filterBorderPixels(const SkBitmap& src, SkBitmap* result, const SkIRect & rect);
84 }; 84 };
85 85
86 #endif 86 #endif
OLDNEW
« no previous file with comments | « include/effects/SkMagnifierImageFilter.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698