Title: [127950] trunk/Source/WebCore
Revision
127950
Author
commit-qu...@webkit.org
Date
2012-09-07 18:30:22 -0700 (Fri, 07 Sep 2012)

Log Message

Fix compilation of TextureMapperShaderManager.cpp with MSVC
https://bugs.webkit.org/show_bug.cgi?id=96121

Patch by Simon Hausmann <simon.hausm...@nokia.com> on 2012-09-07
Reviewed by Kenneth Rohde Christiansen.

Named variadic parameters in macros appear to be a GCC extension. Fortunately __VA_ARGS__ seems
to work with GCC and MSVC here.

* platform/graphics/texmap/TextureMapperShaderManager.cpp:
(WebCore):
(WebCore::StandardFilterProgram::StandardFilterProgram):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (127949 => 127950)


--- trunk/Source/WebCore/ChangeLog	2012-09-08 01:28:44 UTC (rev 127949)
+++ trunk/Source/WebCore/ChangeLog	2012-09-08 01:30:22 UTC (rev 127950)
@@ -1,3 +1,17 @@
+2012-09-07  Simon Hausmann  <simon.hausm...@nokia.com>
+
+        Fix compilation of TextureMapperShaderManager.cpp with MSVC
+        https://bugs.webkit.org/show_bug.cgi?id=96121
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Named variadic parameters in macros appear to be a GCC extension. Fortunately __VA_ARGS__ seems
+        to work with GCC and MSVC here.
+
+        * platform/graphics/texmap/TextureMapperShaderManager.cpp:
+        (WebCore):
+        (WebCore::StandardFilterProgram::StandardFilterProgram):
+
 2012-09-07  Victoria Kirst  <v...@chromium.org>
 
         Seek to end after duration change in HTMLMediaElement

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.cpp (127949 => 127950)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.cpp	2012-09-08 01:28:44 UTC (rev 127949)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.cpp	2012-09-08 01:30:22 UTC (rev 127950)
@@ -30,7 +30,7 @@
 
 namespace WebCore {
 
-#define STRINGIFY(src...) #src
+#define STRINGIFY(...) #__VA_ARGS__
 
 static const char* fragmentShaderSourceOpacityAndMask =
     STRINGIFY(
@@ -388,12 +388,12 @@
                 }
             );
 
-#define STANDARD_FILTER(x...) \
+#define STANDARD_FILTER(...) \
         "precision mediump float;\n"\
         "varying highp vec2 v_texCoord;\n"\
         "uniform highp float u_amount;\n"\
         "uniform sampler2D u_texture;\n"\
-        #x\
+        #__VA_ARGS__ \
         "void main(void)\n { gl_FragColor = shade(texture2D(u_texture, v_texCoord)); }"
 
     const char* fragmentShaderSource = 0;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to