From: mtklein Date: Wed, 10 Aug 2016 14:30:21 +0000 (-0700) Subject: Default GR_GL_FUNCTION_TYPE to __stdcall on Windows. X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~116^2~308 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d96cb8db71895ff1e34d537774f94a578fcec49;p=platform%2Fupstream%2FlibSkiaSharp.git Default GR_GL_FUNCTION_TYPE to __stdcall on Windows. Why is this configurable if we can't work without it? Just to confirm, this is a Windows constraint, not an MSVC constraint, right? Clang on Windows also needs __stdcall? BUG=skia:5617 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2233883002 Review-Url: https://codereview.chromium.org/2233883002 --- diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi index f32d116..c91f46a 100644 --- a/gyp/common_conditions.gypi +++ b/gyp/common_conditions.gypi @@ -66,7 +66,6 @@ { 'defines': [ '_CRT_SECURE_NO_WARNINGS', - 'GR_GL_FUNCTION_TYPE=__stdcall', '_HAS_EXCEPTIONS=0', 'WIN32_LEAN_AND_MEAN', 'NOMINMAX', diff --git a/gyp/gpu.gyp b/gyp/gpu.gyp index c17789a..a2909b8 100644 --- a/gyp/gpu.gyp +++ b/gyp/gpu.gyp @@ -65,13 +65,6 @@ }], ], 'direct_dependent_settings': { - 'conditions': [ - [ 'skia_os == "win"', { - 'defines': [ - 'GR_GL_FUNCTION_TYPE=__stdcall', - ], - }], - ], 'include_dirs': [ '../include/gpu', ], @@ -251,7 +244,7 @@ # the gyp -> android.mk generator doesn't seem to like cpp files # in directories outside of src, bench, or dm. Until this gets fixed # I just start the path in the src directory. - '<(skia_src_path)/../tools/viewer/sk_app/WindowContext.cpp', + '<(skia_src_path)/../tools/viewer/sk_app/WindowContext.cpp', '<(skia_src_path)/../tools/viewer/sk_app/VulkanWindowContext.cpp', '<(skia_src_path)/../tools/viewer/sk_app/android/VulkanWindowContext_android.cpp' ], diff --git a/include/gpu/gl/GrGLConfig.h b/include/gpu/gl/GrGLConfig.h index 82963a7..20ee37f 100644 --- a/include/gpu/gl/GrGLConfig.h +++ b/include/gpu/gl/GrGLConfig.h @@ -21,7 +21,11 @@ #endif #if !defined(GR_GL_FUNCTION_TYPE) - #define GR_GL_FUNCTION_TYPE + #if defined(SK_BUILD_FOR_WIN32) + #define GR_GL_FUNCTION_TYPE __stdcall + #else + #define GR_GL_FUNCTION_TYPE + #endif #endif /**