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

Side by Side Diff: src/core/SkImageFilter.cpp

Issue 112803004: Make SkImageFilter crop rects relative to the primitive origin, instead of relative to their parent (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Updated to ToT Created 6 years, 11 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 | « src/core/SkCanvas.cpp ('k') | src/core/SkImageFilterUtils.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 #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
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
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 }
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkImageFilterUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698