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

Side by Side Diff: include/core/SkImageFilter.h

Issue 1199933011: more tests for offsetimagefilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « gm/offsetimagefilter.cpp ('k') | no next file » | 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 2011 Google Inc. 2 * Copyright 2011 Google Inc.
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 SkImageFilter_DEFINED 8 #ifndef SkImageFilter_DEFINED
9 #define SkImageFilter_DEFINED 9 #define SkImageFilter_DEFINED
10 10
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 * rect is set at construction time, and determines which pixels from the 185 * rect is set at construction time, and determines which pixels from the
186 * input image will be processed. The size of the crop rect should be 186 * input image will be processed. The size of the crop rect should be
187 * used as the size of the destination image. The origin of this rect 187 * used as the size of the destination image. The origin of this rect
188 * should be used to offset access to the input images, and should also 188 * should be used to offset access to the input images, and should also
189 * be added to the "offset" parameter in onFilterImage and 189 * be added to the "offset" parameter in onFilterImage and
190 * filterImageGPU(). (The latter ensures that the resulting buffer is 190 * filterImageGPU(). (The latter ensures that the resulting buffer is
191 * drawn in the correct location.) 191 * drawn in the correct location.)
192 */ 192 */
193 bool cropRectIsSet() const { return fCropRect.flags() != 0x0; } 193 bool cropRectIsSet() const { return fCropRect.flags() != 0x0; }
194 194
195 CropRect getCropRect() const { return fCropRect; }
196
195 // Default impl returns union of all input bounds. 197 // Default impl returns union of all input bounds.
196 virtual void computeFastBounds(const SkRect&, SkRect*) const; 198 virtual void computeFastBounds(const SkRect&, SkRect*) const;
197 199
198 /** 200 /**
199 * Create an SkMatrixImageFilter, which transforms its input by the given ma trix. 201 * Create an SkMatrixImageFilter, which transforms its input by the given ma trix.
200 */ 202 */
201 static SkImageFilter* CreateMatrixFilter(const SkMatrix& matrix, 203 static SkImageFilter* CreateMatrixFilter(const SkMatrix& matrix,
202 SkFilterQuality, 204 SkFilterQuality,
203 SkImageFilter* input = NULL); 205 SkImageFilter* input = NULL);
204 206
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 */ 364 */
363 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ 365 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \
364 Common localVar; \ 366 Common localVar; \
365 do { \ 367 do { \
366 if (!localVar.unflatten(buffer, expectedCount)) { \ 368 if (!localVar.unflatten(buffer, expectedCount)) { \
367 return NULL; \ 369 return NULL; \
368 } \ 370 } \
369 } while (0) 371 } while (0)
370 372
371 #endif 373 #endif
OLDNEW
« no previous file with comments | « gm/offsetimagefilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698