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

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

Issue 2094083002: remove DownSample imagefilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « gyp/effects.gypi ('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
(Empty)
1 /*
2 * Copyright 2011 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef _SkTestImageFilters_h
9 #define _SkTestImageFilters_h
10
11 #include "SkImageFilter.h"
12 #include "SkPoint.h"
13
14 // Fun mode that scales down (only) and then scales back up to look pixelated
15 class SK_API SkDownSampleImageFilter : public SkImageFilter {
16 public:
17 static sk_sp<SkImageFilter> Make(SkScalar scale, sk_sp<SkImageFilter> input) ;
18
19 SK_TO_STRING_OVERRIDE()
20 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDownSampleImageFilter)
21
22 #ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
23 static SkImageFilter* Create(SkScalar scale, SkImageFilter* input = nullptr) {
24 return Make(scale, sk_ref_sp<SkImageFilter>(input)).release();
25 }
26 #endif
27
28 protected:
29 void flatten(SkWriteBuffer&) const override;
30
31 sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&,
32 SkIPoint* offset) const override;
33
34 private:
35 SkDownSampleImageFilter(SkScalar scale, sk_sp<SkImageFilter> input)
36 : INHERITED(&input, 1, nullptr), fScale(scale) {}
37
38 SkScalar fScale;
39
40 typedef SkImageFilter INHERITED;
41 };
42
43 #endif
OLDNEW
« no previous file with comments | « gyp/effects.gypi ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698