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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/gmslides.gypi ('k') | src/effects/SkResizeImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkResizeImageFilter.h
diff --git a/include/effects/SkResizeImageFilter.h b/include/effects/SkResizeImageFilter.h
new file mode 100644
index 0000000000000000000000000000000000000000..d63855561e080585236c3543d7d584270e64d25b
--- /dev/null
+++ b/include/effects/SkResizeImageFilter.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkResizeImageFilter_DEFINED
+#define SkResizeImageFilter_DEFINED
+
+#include "SkImageFilter.h"
+#include "SkScalar.h"
+#include "SkRect.h"
+#include "SkPoint.h"
+#include "SkPaint.h"
+
+/*! \class SkResizeImageFilter
+ Resampling image filter. This filter draws its source image resampled using the given scale
+ values.
+ */
+
+class SK_API SkResizeImageFilter : public SkImageFilter {
+public:
+ /** Construct a (scaling-only) resampling image filter.
+ * @param sx The x scale parameter to apply when resizing.
+ * @param sy The y scale parameter to apply when resizing.
+ * @param filterLevel The quality of filtering to apply when scaling.
+ * @param input The input image filter. If NULL, the src bitmap
+ * passed to filterImage() is used instead.
+ */
+
+ SkResizeImageFilter(SkScalar sx, SkScalar sy, SkPaint::FilterLevel filterLevel,
+ SkImageFilter* input = NULL);
+ virtual ~SkResizeImageFilter();
+
+ SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkResizeImageFilter)
+
+protected:
+ SkResizeImageFilter(SkFlattenableReadBuffer& buffer);
+ virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
+
+ virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
+ SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
+
+private:
+ SkScalar fSx, fSy;
+ SkPaint::FilterLevel fFilterLevel;
+ typedef SkImageFilter INHERITED;
+};
+
+#endif
« 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