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

Unified Diff: include/effects/SkPictureImageFilter.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: Add comments; fix destructor virtuality / privacy 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/SkPictureImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkPictureImageFilter.h
diff --git a/include/effects/SkPictureImageFilter.h b/include/effects/SkPictureImageFilter.h
new file mode 100644
index 0000000000000000000000000000000000000000..64e999d51b9790507f1e15da5ec36c8f93b26d64
--- /dev/null
+++ b/include/effects/SkPictureImageFilter.h
@@ -0,0 +1,38 @@
+/*
+ * 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 SkPictureImageFilter_DEFINED
+#define SkPictureImageFilter_DEFINED
+
+#include "SkImageFilter.h"
+#include "SkPicture.h"
+
+class SK_API SkPictureImageFilter : public SkImageFilter {
+public:
+ // Refs the passed-in picture.
+ explicit SkPictureImageFilter(SkPicture* picture);
+
+ // Refs the passed-in picture. rect can be used to crop or expand the destination rect when
reed1 2013/12/12 21:51:54 nit for the future -- when we document public head
Stephen White 2013/12/12 21:56:45 Done.
+ // the picture is drawn. (No scaling is implied by the dest rect; only the CTM is applied.)
+ SkPictureImageFilter(SkPicture* picture, const SkRect& rect);
+
+ SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureImageFilter)
+
+protected:
+ virtual ~SkPictureImageFilter();
+ explicit SkPictureImageFilter(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/SkPictureImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698