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 |