Index: include/effects/SkFlattenableUtils.h |
diff --git a/include/effects/SkFlattenableUtils.h b/include/effects/SkFlattenableUtils.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..365ef3c8f3a1de29de89c291d01f61da4aa674d2 |
--- /dev/null |
+++ b/include/effects/SkFlattenableUtils.h |
@@ -0,0 +1,27 @@ |
+/* |
+ * 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 SkFlattenableUtils_DEFINED |
+#define SkFlattenableUtils_DEFINED |
+ |
+#include "SkFlattenable.h" |
+ |
+namespace SkFlattenableUtils { |
+ |
+/** Returns the factory function required to create the given type |
+ */ |
+SkFlattenable::Factory TypeToFactory(SkFlattenable::Type type); |
mtklein
2013/09/24 22:52:18
I'm confused why we have both these two functions
sugoi1
2013/09/25 21:15:27
It's only a question of dependencies. I need to be
|
+ |
+/** Checks if typeA is a typeB |
+ * For example, if typeA is kSkImageFilter and typeB is kSkFlattenable, this would return true |
+ * Inversely, if typeA is kSkFlattenable and typeB is kSkImageFilter, this would return false |
+ */ |
+bool TypeIsA(SkFlattenable::Type typeA, SkFlattenable::Type typeB); |
+ |
+}; |
+ |
+#endif |