Bug 1244454 - Fixed skia compilation on mingw. r=lsalzman

This commit is contained in:
Jacek Caban 2016-02-01 17:55:09 +01:00
parent 4d5abb28bf
commit f03395c04b
3 changed files with 4 additions and 7 deletions

View File

@ -300,7 +300,7 @@
# endif
#endif
#if defined(SK_BUILD_FOR_WIN) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
#if defined(_MSC_VER) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
#define SK_VECTORCALL __vectorcall
#elif defined(SK_CPU_ARM32)
#define SK_VECTORCALL __attribute__((pcs("aapcs-vfp")))

View File

@ -119,15 +119,12 @@ template <typename> struct is_function : false_type { };
#if !defined(SK_BUILD_FOR_WIN)
template <typename R, typename... Args> struct is_function<R(Args...)> : true_type {};
#else
#if defined(_M_IX86)
template <typename R, typename... Args> struct is_function<R __cdecl (Args...)> : true_type {};
#if defined(_M_IX86)
template <typename R, typename... Args> struct is_function<R __stdcall (Args...)> : true_type {};
template <typename R, typename... Args> struct is_function<R __fastcall (Args...)> : true_type {};
#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
template <typename R, typename... Args> struct is_function<R __vectorcall (Args...)> : true_type {};
#endif
#else
template <typename R, typename... Args> struct is_function<R __cdecl (Args...)> : true_type {};
#if defined(_MSC_VER) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
template <typename R, typename... Args> struct is_function<R __vectorcall (Args...)> : true_type {};
#endif
#endif

View File

@ -16,7 +16,7 @@ void* DynamicLoadLibrary(const char* libraryName) {
}
void* GetProcedureAddress(void* library, const char* functionName) {
return ::GetProcAddress((HMODULE)library, functionName);
return reinterpret_cast<void*>(::GetProcAddress((HMODULE)library, functionName));
}
#endif//defined(SK_BUILD_FOR_WIN32)