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

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

Issue 503833002: Reimplement deserialization of SkImageFilter's uniqueID. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
« no previous file with comments | « include/effects/SkLightingImageFilter.h ('k') | include/effects/SkMatrixImageFilter.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
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 @param cropRect The rectangle to which the output processing will be limited. 53 @param cropRect The rectangle to which the output processing will be limited.
54 */ 54 */
55 static SkMatrixConvolutionImageFilter* Create(const SkISize& kernelSize, 55 static SkMatrixConvolutionImageFilter* Create(const SkISize& kernelSize,
56 const SkScalar* kernel, 56 const SkScalar* kernel,
57 SkScalar gain, 57 SkScalar gain,
58 SkScalar bias, 58 SkScalar bias,
59 const SkIPoint& kernelOffset, 59 const SkIPoint& kernelOffset,
60 TileMode tileMode, 60 TileMode tileMode,
61 bool convolveAlpha, 61 bool convolveAlpha,
62 SkImageFilter* input = NULL, 62 SkImageFilter* input = NULL,
63 const CropRect* cropRect = NUL L) { 63 const CropRect* cropRect = NUL L,
64 uint32_t uniqueID = 0) {
64 return SkNEW_ARGS(SkMatrixConvolutionImageFilter, (kernelSize, kernel, g ain, bias, 65 return SkNEW_ARGS(SkMatrixConvolutionImageFilter, (kernelSize, kernel, g ain, bias,
65 kernelOffset, tileMod e, convolveAlpha, 66 kernelOffset, tileMod e, convolveAlpha,
66 input, cropRect)); 67 input, cropRect, uniq ueID));
67 } 68 }
68 69
69 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixConvolutionImage Filter) 70 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixConvolutionImage Filter)
70 71
71 protected: 72 protected:
72 SkMatrixConvolutionImageFilter(const SkISize& kernelSize, 73 SkMatrixConvolutionImageFilter(const SkISize& kernelSize,
73 const SkScalar* kernel, 74 const SkScalar* kernel,
74 SkScalar gain, 75 SkScalar gain,
75 SkScalar bias, 76 SkScalar bias,
76 const SkIPoint& kernelOffset, 77 const SkIPoint& kernelOffset,
77 TileMode tileMode, 78 TileMode tileMode,
78 bool convolveAlpha, 79 bool convolveAlpha,
79 SkImageFilter* input, 80 SkImageFilter* input,
80 const CropRect* cropRect); 81 const CropRect* cropRect,
82 uint32_t uniqueID);
81 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING 83 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
82 explicit SkMatrixConvolutionImageFilter(SkReadBuffer& buffer); 84 explicit SkMatrixConvolutionImageFilter(SkReadBuffer& buffer);
83 #endif 85 #endif
84 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 86 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
85 87
86 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, 88 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
87 SkBitmap* result, SkIPoint* loc) const SK_OVERRID E; 89 SkBitmap* result, SkIPoint* loc) const SK_OVERRID E;
88 virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const SK_OVERRIDE; 90 virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const SK_OVERRIDE;
89 91
90 92
(...skipping 28 matching lines...) Expand all
119 SkBitmap* result, 121 SkBitmap* result,
120 const SkIRect& rect, 122 const SkIRect& rect,
121 const SkIRect& bounds) const; 123 const SkIRect& bounds) const;
122 void filterBorderPixels(const SkBitmap& src, 124 void filterBorderPixels(const SkBitmap& src,
123 SkBitmap* result, 125 SkBitmap* result,
124 const SkIRect& rect, 126 const SkIRect& rect,
125 const SkIRect& bounds) const; 127 const SkIRect& bounds) const;
126 }; 128 };
127 129
128 #endif 130 #endif
OLDNEW
« no previous file with comments | « include/effects/SkLightingImageFilter.h ('k') | include/effects/SkMatrixImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698