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

Unified Diff: include/effects/SkFlattenableUtils.h

Issue 23021015: Initial error handling code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: New serialization method Created 7 years, 3 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
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

Powered by Google App Engine
This is Rietveld 408576698