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

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

Issue 1858353002: Update SkMatrixImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix fuzz Created 4 years, 8 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/resizeimagefilter.cpp ('k') | samplecode/SampleFilterFuzz.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 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 263
264 #ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR 264 #ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
265 SkImageFilter* newWithLocalMatrix(const SkMatrix& matrix) const { 265 SkImageFilter* newWithLocalMatrix(const SkMatrix& matrix) const {
266 return this->makeWithLocalMatrix(matrix).release(); 266 return this->makeWithLocalMatrix(matrix).release();
267 } 267 }
268 #endif 268 #endif
269 269
270 /** 270 /**
271 * Create an SkMatrixImageFilter, which transforms its input by the given ma trix. 271 * Create an SkMatrixImageFilter, which transforms its input by the given ma trix.
272 */ 272 */
273 static sk_sp<SkImageFilter> MakeMatrixFilter(const SkMatrix& matrix,
274 SkFilterQuality,
275 sk_sp<SkImageFilter> input);
276 #ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
273 static SkImageFilter* CreateMatrixFilter(const SkMatrix& matrix, 277 static SkImageFilter* CreateMatrixFilter(const SkMatrix& matrix,
274 SkFilterQuality, 278 SkFilterQuality filterQuality,
275 SkImageFilter* input = NULL); 279 SkImageFilter* input = nullptr) {
280 return MakeMatrixFilter(matrix, filterQuality, sk_ref_sp<SkImageFilter>( input)).release();
281 }
282 #endif
283
276 284
277 sk_sp<SkSpecialImage> filterInput(int index, 285 sk_sp<SkSpecialImage> filterInput(int index,
278 SkSpecialImage* src, 286 SkSpecialImage* src,
279 const Context&, 287 const Context&,
280 SkIPoint* offset) const; 288 SkIPoint* offset) const;
281 289
282 #if SK_SUPPORT_GPU 290 #if SK_SUPPORT_GPU
283 // Helper function which invokes GPU filter processing on the 291 // Helper function which invokes GPU filter processing on the
284 // input at the specified "index". If the input is null, it leaves 292 // input at the specified "index". If the input is null, it leaves
285 // "result" and "offset" untouched, and returns true. If the input 293 // "result" and "offset" untouched, and returns true. If the input
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 */ 495 */
488 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ 496 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \
489 Common localVar; \ 497 Common localVar; \
490 do { \ 498 do { \
491 if (!localVar.unflatten(buffer, expectedCount)) { \ 499 if (!localVar.unflatten(buffer, expectedCount)) { \
492 return NULL; \ 500 return NULL; \
493 } \ 501 } \
494 } while (0) 502 } while (0)
495 503
496 #endif 504 #endif
OLDNEW
« no previous file with comments | « gm/resizeimagefilter.cpp ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698