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

Unified Diff: include/effects/SkTileImageFilter.h

Issue 24157005: Moving 4 SkImageFilter derived classes from blink to skia (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Merged new filters into existing ones Created 7 years, 3 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
Index: include/effects/SkTileImageFilter.h
diff --git a/include/effects/SkTileImageFilter.h b/include/effects/SkTileImageFilter.h
new file mode 100644
index 0000000000000000000000000000000000000000..125770cd05442067f8fadeb4770da252c1f40072
--- /dev/null
+++ b/include/effects/SkTileImageFilter.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2013 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkTileImageFilter_DEFINED
+#define SkTileImageFilter_DEFINED
+
+#include "SkImageFilter.h"
+
+class SkTileImageFilter : public SkImageFilter {
+ typedef SkImageFilter INHERITED;
+
+public:
+ SkTileImageFilter(const SkRect& srcRect, const SkRect& dstRect, SkImageFilter* input)
reed1 2013/09/24 20:11:57 Add some dox for what it does, and the two rects?
sugoi1 2013/09/25 15:41:08 Done.
+ : INHERITED(input), fSrcRect(srcRect), fDstRect(dstRect) {}
+
+ virtual bool onFilterImage(Proxy* proxy, const SkBitmap& src, const SkMatrix& ctm,
+ SkBitmap* dst, SkIPoint* offset) SK_OVERRIDE;
+
+ SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTileImageFilter)
+
+protected:
+ explicit SkTileImageFilter(SkFlattenableReadBuffer& buffer);
+
+ virtual void flatten(SkFlattenableWriteBuffer& buffer) const SK_OVERRIDE;
+
+private:
+ SkRect fSrcRect;
+ SkRect fDstRect;
+};
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698