Title: [127934] trunk/Source/WebCore
Revision
127934
Author
commit-qu...@webkit.org
Date
2012-09-07 16:19:41 -0700 (Fri, 07 Sep 2012)

Log Message

Fix build of GraphicsContext3DOpenGLCommon.cpp with MSVC
https://bugs.webkit.org/show_bug.cgi?id=96120

Patch by Simon Hausmann <simon.hausm...@nokia.com> on 2012-09-07
Reviewed by Noam Rosenthal.

Variable stack arrays are a GCC extension. Replace their use with OwnArrayPtr, similar to
other functions in the same file.

* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::getActiveAttrib):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (127933 => 127934)


--- trunk/Source/WebCore/ChangeLog	2012-09-07 23:16:39 UTC (rev 127933)
+++ trunk/Source/WebCore/ChangeLog	2012-09-07 23:19:41 UTC (rev 127934)
@@ -1,3 +1,16 @@
+2012-09-07  Simon Hausmann  <simon.hausm...@nokia.com>
+
+        Fix build of GraphicsContext3DOpenGLCommon.cpp with MSVC
+        https://bugs.webkit.org/show_bug.cgi?id=96120
+
+        Reviewed by Noam Rosenthal.
+
+        Variable stack arrays are a GCC extension. Replace their use with OwnArrayPtr, similar to
+        other functions in the same file.
+
+        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
+        (WebCore::GraphicsContext3D::getActiveAttrib):
+
 2012-09-07  Emil A Eklund  <e...@chromium.org>
 
         Prevent overflows in FractionalLayoutUnit

Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp (127933 => 127934)


--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp	2012-09-07 23:16:39 UTC (rev 127933)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp	2012-09-07 23:19:41 UTC (rev 127934)
@@ -629,14 +629,14 @@
     makeContextCurrent();
     GLint maxAttributeSize = 0;
     ::glGetProgramiv(program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &maxAttributeSize);
-    GLchar name[maxAttributeSize]; // GL_ACTIVE_ATTRIBUTE_MAX_LENGTH includes null termination.
+    OwnArrayPtr<GLchar> name = adoptArrayPtr(new GLchar[maxAttributeSize]); // GL_ACTIVE_ATTRIBUTE_MAX_LENGTH includes null termination.
     GLsizei nameLength = 0;
     GLint size = 0;
     GLenum type = 0;
-    ::glGetActiveAttrib(program, index, maxAttributeSize, &nameLength, &size, &type, name);
+    ::glGetActiveAttrib(program, index, maxAttributeSize, &nameLength, &size, &type, name.get());
     if (!nameLength)
         return false;
-    info.name = String(name, nameLength);
+    info.name = String(name.get(), nameLength);
     info.type = type;
     info.size = size;
     return true;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to