Default GR_GL_FUNCTION_TYPE to __stdcall on Windows.
authormtklein <mtklein@chromium.org>
Wed, 10 Aug 2016 14:30:21 +0000 (07:30 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 10 Aug 2016 14:30:21 +0000 (07:30 -0700)
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

gyp/common_conditions.gypi
gyp/gpu.gyp
include/gpu/gl/GrGLConfig.h

index f32d116..c91f46a 100644 (file)
@@ -66,7 +66,6 @@
       {
         'defines': [
           '_CRT_SECURE_NO_WARNINGS',
-          'GR_GL_FUNCTION_TYPE=__stdcall',
           '_HAS_EXCEPTIONS=0',
           'WIN32_LEAN_AND_MEAN',
           'NOMINMAX',
index c17789a..a2909b8 100644 (file)
       }],
     ],
     'direct_dependent_settings': {
-      'conditions': [
-        [ 'skia_os == "win"', {
-          'defines': [
-            'GR_GL_FUNCTION_TYPE=__stdcall',
-          ],
-        }],
-      ],
       'include_dirs': [
         '../include/gpu',
       ],
                 # 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'
               ],
index 82963a7..20ee37f 100644 (file)
 #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
 
 /**