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

Unified Diff: include/private/SkTLogic.h

Issue 1820433002: Revert of Templatize SkToXXX. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « include/private/SkTFitsIn.h ('k') | src/core/SkDebug.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/private/SkTLogic.h
diff --git a/include/private/SkTLogic.h b/include/private/SkTLogic.h
index a3bc55e14e26aee875a5736d5357d87554870a99..b38fd50435cbccfd5de0dbeff15eca9e0d9fdd88 100644
--- a/include/private/SkTLogic.h
+++ b/include/private/SkTLogic.h
@@ -13,6 +13,8 @@
#ifndef SkTLogic_DEFINED
#define SkTLogic_DEFINED
+
+#include "SkTypes.h"
#include <stddef.h>
#include <stdint.h>
@@ -40,7 +42,7 @@
// On all platforms, variadic functions only exist in the c calling convention.
// mcvc 2013 introduced __vectorcall, but it wan't until 2015 that it was added to is_function.
template <typename> struct is_function : std::false_type {};
-#if !defined(WIN32)
+#if !defined(SK_BUILD_FOR_WIN)
template <typename R, typename... Args> struct is_function<R(Args...)> : std::true_type {};
#else
template <typename R, typename... Args> struct is_function<R __cdecl (Args...)> : std::true_type {};
@@ -48,7 +50,7 @@
template <typename R, typename... Args> struct is_function<R __stdcall (Args...)> : std::true_type {};
template <typename R, typename... Args> struct is_function<R __fastcall (Args...)> : std::true_type {};
#endif
-#if defined(_MSC_VER) && (_M_IX86_FP >= 2 || defined(_M_AMD64) || defined(_M_X64))
+#if defined(_MSC_VER) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
template <typename R, typename... Args> struct is_function<R __vectorcall (Args...)> : std::true_type {};
#endif
#endif
@@ -61,7 +63,6 @@
template <typename T> using add_lvalue_reference_t = typename std::add_lvalue_reference<T>::type;
template <typename... T> using common_type_t = typename std::common_type<T...>::type;
-template <typename T> using underlying_type_t = typename std::underlying_type<T>::type;
template <typename S, typename D,
bool=std::is_void<S>::value || is_function<D>::value || std::is_array<D>::value>
« no previous file with comments | « include/private/SkTFitsIn.h ('k') | src/core/SkDebug.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698