OLD | NEW |
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 #include "SkImageFilter.h" | 8 #include "SkImageFilter.h" |
9 | 9 |
10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 if (input != NULL) { | 86 if (input != NULL) { |
87 buffer.writeFlattenable(input); | 87 buffer.writeFlattenable(input); |
88 } | 88 } |
89 } | 89 } |
90 buffer.writeRect(fCropRect.rect()); | 90 buffer.writeRect(fCropRect.rect()); |
91 buffer.writeUInt(fCropRect.flags()); | 91 buffer.writeUInt(fCropRect.flags()); |
92 } | 92 } |
93 | 93 |
94 bool SkImageFilter::filterImage(Proxy* proxy, const SkBitmap& src, | 94 bool SkImageFilter::filterImage(Proxy* proxy, const SkBitmap& src, |
95 const SkMatrix& ctm, | 95 const SkMatrix& ctm, |
96 SkBitmap* result, SkIPoint* loc) { | 96 SkBitmap* result, SkIPoint* offset) { |
97 SkASSERT(result); | 97 SkASSERT(result); |
98 SkASSERT(loc); | 98 SkASSERT(offset); |
99 /* | 99 /* |
100 * Give the proxy first shot at the filter. If it returns false, ask | 100 * Give the proxy first shot at the filter. If it returns false, ask |
101 * the filter to do it. | 101 * the filter to do it. |
102 */ | 102 */ |
103 return (proxy && proxy->filterImage(this, src, ctm, result, loc)) || | 103 return (proxy && proxy->filterImage(this, src, ctm, result, offset)) || |
104 this->onFilterImage(proxy, src, ctm, result, loc); | 104 this->onFilterImage(proxy, src, ctm, result, offset); |
105 } | 105 } |
106 | 106 |
107 bool SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm, | 107 bool SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm, |
108 SkIRect* dst) { | 108 SkIRect* dst) { |
109 SkASSERT(&src); | 109 SkASSERT(&src); |
110 SkASSERT(dst); | 110 SkASSERT(dst); |
111 return this->onFilterBounds(src, ctm, dst); | 111 return this->onFilterBounds(src, ctm, dst); |
112 } | 112 } |
113 | 113 |
114 bool SkImageFilter::onFilterImage(Proxy*, const SkBitmap&, const SkMatrix&, | 114 bool SkImageFilter::onFilterImage(Proxy*, const SkBitmap&, const SkMatrix&, |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 return true; | 189 return true; |
190 } | 190 } |
191 | 191 |
192 bool SkImageFilter::asNewEffect(GrEffectRef**, GrTexture*, const SkMatrix&, cons
t SkIRect&) const { | 192 bool SkImageFilter::asNewEffect(GrEffectRef**, GrTexture*, const SkMatrix&, cons
t SkIRect&) const { |
193 return false; | 193 return false; |
194 } | 194 } |
195 | 195 |
196 bool SkImageFilter::asColorFilter(SkColorFilter**) const { | 196 bool SkImageFilter::asColorFilter(SkColorFilter**) const { |
197 return false; | 197 return false; |
198 } | 198 } |
OLD | NEW |