Changeset 57174 in webkit


Ignore:
Timestamp:
Apr 6, 2010 3:55:10 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-04-06 Jarkko Sakkinen <jarkko.j.sakkinen@gmail.com>

Reviewed by Laszlo Gombos.

[Qt] WebKit does not build on Windows with --3d-canvas
https://bugs.webkit.org/show_bug.cgi?id=37026

  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::getActiveAttrib): (WebCore::GraphicsContext3D::getActiveUniform):
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r57170 r57174  
     12010-04-06  Jarkko Sakkinen  <jarkko.j.sakkinen@gmail.com>
     2
     3        Reviewed by Laszlo Gombos.
     4
     5        [Qt] WebKit does not build on Windows with --3d-canvas
     6        https://bugs.webkit.org/show_bug.cgi?id=37026
     7
     8        * platform/graphics/GraphicsContext3D.h:
     9        * platform/graphics/qt/GraphicsContext3DQt.cpp:
     10        (WebCore::GraphicsContext3D::getActiveAttrib):
     11        (WebCore::GraphicsContext3D::getActiveUniform):
     12
    1132010-04-06  Abhinav Mithal <abhinav.mithal@nokia.com>
    214
  • trunk/WebCore/platform/graphics/GraphicsContext3D.h

    r57018 r57174  
    3434
    3535// FIXME: Find a better way to avoid the name confliction for NO_ERROR.
    36 #if ((PLATFORM(CHROMIUM) && OS(WINDOWS)) || PLATFORM(WIN))
     36#if ((PLATFORM(CHROMIUM) && OS(WINDOWS)) || PLATFORM(WIN) || (PLATFORM(QT) && OS(WINDOWS)))
    3737#undef NO_ERROR
    3838#endif
  • trunk/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp

    r56825 r57174  
    5353#endif
    5454
     55typedef ptrdiff_t GLsizeiptrType;
     56typedef ptrdiff_t GLintptrType;
     57
    5558typedef void (APIENTRY* glActiveTextureType) (GLenum);
    5659typedef void (APIENTRY* glAttachShaderType) (GLuint, GLuint);
     
    6366typedef void (APIENTRY* glBlendEquationSeparateType)(GLenum, GLenum);
    6467typedef void (APIENTRY* glBlendFuncSeparateType)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
    65 typedef void (APIENTRY* glBufferDataType) (GLenum, GLsizeiptr, const GLvoid*, GLenum);
    66 typedef void (APIENTRY* glBufferSubDataType) (GLenum, GLintptr, GLsizeiptr, const GLvoid*);
     68typedef void (APIENTRY* glBufferDataType) (GLenum, GLsizeiptrType, const GLvoid*, GLenum);
     69typedef void (APIENTRY* glBufferSubDataType) (GLenum, GLintptrType, GLsizeiptrType, const GLvoid*);
    6770typedef GLenum (APIENTRY* glCheckFramebufferStatusType) (GLenum);
    6871typedef void (APIENTRY* glCompileShaderType) (GLuint);
     
    149152
    150153    bool isContextValid() { return m_contextValid; }
     154
     155
    151156
    152157    glActiveTextureType activeTexture;
     
    814819    m_internal->getProgramiv(static_cast<GLuint>(program->object()), GraphicsContext3D::ACTIVE_ATTRIBUTE_MAX_LENGTH, &maxLength);
    815820
    816     GLchar name[maxLength];
     821    GLchar* name = (GLchar*) fastMalloc(maxLength);
    817822    GLsizei nameLength;
    818823    GLint size;
     
    821826    m_internal->getActiveAttrib(static_cast<GLuint>(program->object()), index, maxLength, &nameLength, &size, &type, name);
    822827
    823     if (!nameLength)
     828    if (!nameLength) {
     829        fastFree(name);
    824830        return false;
     831    }
    825832
    826833    info.name = String(name, nameLength);
     
    828835    info.size = size;
    829836
     837    fastFree(name);
    830838    return true;
    831839}
     
    843851    m_internal->getProgramiv(static_cast<GLuint>(program->object()), GraphicsContext3D::ACTIVE_UNIFORM_MAX_LENGTH, &maxLength);
    844852
    845     GLchar name[maxLength];
     853    GLchar* name = (GLchar*) fastMalloc(maxLength);
    846854    GLsizei nameLength;
    847855    GLint size;
     
    850858    m_internal->getActiveUniform(static_cast<GLuint>(program->object()), index, maxLength, &nameLength, &size, &type, name);
    851859
    852     if (!nameLength)
     860    if (!nameLength) {
     861        fastFree(name);
    853862        return false;
     863    }
    854864
    855865    info.name = String(name, nameLength);
     
    857867    info.size = size;
    858868
     869    fastFree(name);
    859870    return true;
    860871}
Note: See TracChangeset for help on using the changeset viewer.