aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private
diff options
context:
space:
mode:
Diffstat (limited to 'include/private')
-rw-r--r--include/private/SkOpts.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/private/SkOpts.h b/include/private/SkOpts.h
new file mode 100644
index 0000000000..0594588e29
--- /dev/null
+++ b/include/private/SkOpts.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkOpts_DEFINED
+#define SkOpts_DEFINED
+
+#include "SkTypes.h"
+
+namespace SkOpts {
+ // Call to replace pointers to portable functions with pointers to CPU-specific functions.
+ // Thread-safe and idempotent.
+ // Called by SkGraphics::Init(), and automatically #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS.
+ void Init();
+
+ // Declare function pointers here...
+
+ // Returns a fast approximation of 1.0f/sqrtf(x).
+ extern float (*rsqrt)(float);
+
+ // See SkUtils.h
+ extern void (*memset16)(uint16_t[], uint16_t, int);
+ extern void (*memset32)(uint32_t[], uint32_t, int);
+}
+
+#endif//SkOpts_DEFINED