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

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: Add registration to fix cross-process pipe tests. 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 | « gyp/gmslides.gypi ('k') | src/effects/SkResizeImageFilter.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 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 values.
20 */
21
22 class SK_API SkResizeImageFilter : public SkImageFilter {
23 public:
24 /** Construct a (scaling-only) resampling image filter.
25 * @param sx The x scale parameter to apply when resizing.
26 * @param sy The y scale parameter to apply when resizing.
27 * @param filterLevel The quality of filtering to apply when scaling.
28 * @param input The input image filter. If NULL, the src bitmap
29 * passed to filterImage() is used instead.
30 */
31
32 SkResizeImageFilter(SkScalar sx, SkScalar sy, SkPaint::FilterLevel filterLev el,
33 SkImageFilter* input = NULL);
34 virtual ~SkResizeImageFilter();
35
36 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkResizeImageFilter)
37
38 protected:
39 SkResizeImageFilter(SkFlattenableReadBuffer& buffer);
40 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
41
42 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
43 SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
44
45 private:
46 SkScalar fSx, fSy;
47 SkPaint::FilterLevel fFilterLevel;
48 typedef SkImageFilter INHERITED;
49 };
50
51 #endif
OLDNEW
« no previous file with comments | « gyp/gmslides.gypi ('k') | src/effects/SkResizeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698