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

Unified Diff: include/core/SkDrawLooper.h

Issue 253633003: add asAShadowBlur for android to drawlooper (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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 | « no previous file | include/effects/SkBlurDrawLooper.h » ('j') | src/effects/SkBlurDrawLooper.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkDrawLooper.h
diff --git a/include/core/SkDrawLooper.h b/include/core/SkDrawLooper.h
index cc42952d07acc289ce21ee2cbd75de5a0a74c4e9..0e7643c40d450786b7763cfa0bd1ba144b3bb052 100644
--- a/include/core/SkDrawLooper.h
+++ b/include/core/SkDrawLooper.h
@@ -11,6 +11,8 @@
#define SkDrawLooper_DEFINED
#include "SkFlattenable.h"
+#include "SkPoint.h"
+#include "SkColor.h"
class SkCanvas;
class SkPaint;
@@ -88,6 +90,22 @@ public:
virtual void computeFastBounds(const SkPaint& paint,
const SkRect& src, SkRect* dst) const;
+ struct BlurShadowRec {
+ SkScalar fRadius;
djsollen 2014/04/28 13:55:40 As we discussed offline, I think this should retur
+ SkVector fOffset;
+ SkColor fColor;
+ };
+ /**
+ * If this looper can be interpreted as having two layers, such that
+ * 1. The first layer (bottom most) just has a color, blur, and translate
+ * 2. The second layer has no modifications to either paint or canvas
+ * 3. No other layers.
+ * then return true, and if not null, fill out the BlurShadowRec).
+ *
+ * If any of the above are not met, return false and ignore the BlurShadowRec parameter.
+ */
+ virtual bool asABlurShadow(BlurShadowRec*) const;
scroggo 2014/04/28 13:28:06 Does this need to be on the base class? It seems v
djsollen 2014/04/28 13:55:40 It does need to be on the base class since it allo
+
SK_TO_STRING_PUREVIRT()
SK_DEFINE_FLATTENABLE_TYPE(SkDrawLooper)
« no previous file with comments | « no previous file | include/effects/SkBlurDrawLooper.h » ('j') | src/effects/SkBlurDrawLooper.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698