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

Unified Diff: include/effects/SkPictureSource.h

Issue 114263002: Implement an SkPicture image filter source. This is required for the external-SVG reference feature… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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/SkPictureSource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkPictureSource.h
diff --git a/include/effects/SkPictureSource.h b/include/effects/SkPictureSource.h
new file mode 100644
index 0000000000000000000000000000000000000000..bb34718fe8bdf8c93509ddd91de212ba263381b1
--- /dev/null
+++ b/include/effects/SkPictureSource.h
@@ -0,0 +1,33 @@
+/*
+ * 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 SkPictureSource_DEFINED
+#define SkPictureSource_DEFINED
+
+#include "SkImageFilter.h"
+#include "SkPicture.h"
+
+class SK_API SkPictureSource : public SkImageFilter {
reed1 2013/12/12 19:31:53 Name looks a little too general... how about SkPic
+public:
+ explicit SkPictureSource(const SkPicture& picture);
reed1 2013/12/12 19:31:53 dox: - do you 'ref' the picture argument? I know
+ SkPictureSource(const SkPicture& picture, const SkRect& rect);
reed1 2013/12/12 19:31:53 dox: - is rect a crop rect, or is it resizing the
+
+ SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureSource)
+
+protected:
+ explicit SkPictureSource(SkFlattenableReadBuffer& buffer);
+ virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
+ virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
+ SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
+
+private:
+ SkPicture fPicture;
+ SkRect fRect;
+ typedef SkImageFilter INHERITED;
+};
+
+#endif
« no previous file with comments | « gyp/gmslides.gypi ('k') | src/effects/SkPictureSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698