Index: src/core/SkSurfacePriv.h |
diff --git a/src/core/SkSurfacePriv.h b/src/core/SkSurfacePriv.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..74d19a6df49c586feeaa804a6e7476b20c5e0b3c |
--- /dev/null |
+++ b/src/core/SkSurfacePriv.h |
@@ -0,0 +1,25 @@ |
+/* |
+ * Copyright 2014 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#ifndef SkSurfacePriv_DEFINED |
+#define SkSurfacePriv_DEFINED |
+ |
+#include "SkSurfaceProps.h" |
+ |
+static inline SkSurfaceProps SkSurfacePropsCopyOrDefault(const SkSurfaceProps* props) { |
+ if (props) { |
+ return *props; |
+ } else { |
+ return SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType); |
+ } |
+} |
+ |
+static inline SkPixelGeometry SkSurfacePropsDefaultPixelGeometry() { |
+ return SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType).pixelGeometry(); |
+} |
+ |
+#endif |