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

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

Issue 136863006: Implement a resize image filter. This is needed for the "filterRes" feature in SVG filter effects, … (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix docs 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
OLDNEW
(Empty)
1 /*
2 * Copyright 2013 The Android Open Source Project
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 SkResizeImageFilter_DEFINED
9 #define SkResizeImageFilter_DEFINED
10
11 #include "SkImageFilter.h"
12 #include "SkScalar.h"
13 #include "SkRect.h"
14 #include "SkPoint.h"
15 #include "SkPaint.h"
16
17 /*! \class SkResizeImageFilter
18 Resampling image filter. This filter draws its source image resampled using the given scale.
19 */
20
21 class SK_API SkResizeImageFilter : public SkImageFilter {
22 public:
23 /** Construct a (scaling-only) resampling image filter.
24 * @param scale The scale parameter to apply when resizing.
25 * @param filterLevel The quality of filtering to apply when scaling.
26 * @param input The input image filter. If NULL, the src bitmap
27 * passed to filterImage() is used instead.
28 */
29
30 SkResizeImageFilter(const SkSize& scale, SkPaint::FilterLevel filterLevel, S kImageFilter* input = NULL);
reed1 2014/01/13 22:02:57 nit: col width > 100. You could drop 'filterLevel'
Stephen White 2014/01/14 21:45:43 Unfortunately that wasn't enough after I split the
31 virtual ~SkResizeImageFilter();
32
33 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkResizeImageFilter)
34
35 protected:
36 SkResizeImageFilter(SkFlattenableReadBuffer& buffer);
37 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
38
39 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
40 SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
41
42 private:
43 SkSize fScale;
44 SkPaint::FilterLevel fFilterLevel;
45 typedef SkImageFilter INHERITED;
46 };
47
48 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698