Changeset 73244 in webkit


Ignore:
Timestamp:
Dec 2, 2010 11:25:10 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-12-02 Gregg Tavares <gman@google.com>

Reviewed by David Levin.

Need to initialize destination variables before calling GL
https://bugs.webkit.org/show_bug.cgi?id=50048

No new tests because no change in functionality.

  • html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::initializeRenderbuffers):
  • html/canvas/WebGLProgram.cpp: (WebCore::WebGLProgram::cacheActiveAttribLocations):
  • html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getAttachedShaders): (WebCore::WebGLRenderingContext::getBufferParameter): (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): (WebCore::WebGLRenderingContext::getBooleanParameter): (WebCore::WebGLRenderingContext::getFloatParameter): (WebCore::WebGLRenderingContext::getLongParameter): (WebCore::WebGLRenderingContext::getUnsignedLongParameter):
  • platform/graphics/chromium/LayerChromium.cpp: (WebCore::loadShader): (WebCore::LayerChromium::createShaderProgram):
  • platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initializeSharedObjects):
  • platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::reset):
  • platform/graphics/gpu/Shader.cpp: (WebCore::Shader::loadProgram):
Location:
trunk/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r73241 r73244  
     12010-12-02  Gregg Tavares  <gman@google.com>
     2
     3        Reviewed by David Levin.
     4
     5        Need to initialize destination variables before calling GL
     6        https://bugs.webkit.org/show_bug.cgi?id=50048
     7
     8        No new tests because no change in functionality.
     9
     10        * html/canvas/WebGLFramebuffer.cpp:
     11        (WebCore::WebGLFramebuffer::initializeRenderbuffers):
     12        * html/canvas/WebGLProgram.cpp:
     13        (WebCore::WebGLProgram::cacheActiveAttribLocations):
     14        * html/canvas/WebGLRenderingContext.cpp:
     15        (WebCore::WebGLRenderingContext::getAttachedShaders):
     16        (WebCore::WebGLRenderingContext::getBufferParameter):
     17        (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
     18        (WebCore::WebGLRenderingContext::getBooleanParameter):
     19        (WebCore::WebGLRenderingContext::getFloatParameter):
     20        (WebCore::WebGLRenderingContext::getLongParameter):
     21        (WebCore::WebGLRenderingContext::getUnsignedLongParameter):
     22        * platform/graphics/chromium/LayerChromium.cpp:
     23        (WebCore::loadShader):
     24        (WebCore::LayerChromium::createShaderProgram):
     25        * platform/graphics/chromium/LayerRendererChromium.cpp:
     26        (WebCore::LayerRendererChromium::initializeSharedObjects):
     27        * platform/graphics/gpu/DrawingBuffer.cpp:
     28        (WebCore::DrawingBuffer::reset):
     29        * platform/graphics/gpu/Shader.cpp:
     30        (WebCore::Shader::loadProgram):
     31
    1322010-12-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
    233
  • trunk/WebCore/html/canvas/WebGLFramebuffer.cpp

    r72433 r73244  
    234234    float colorClearValue[] = {0, 0, 0, 0}, depthClearValue = 0;
    235235    int stencilClearValue = 0;
    236     unsigned char colorMask[] = {1, 1, 1, 1}, depthMask = 1;
     236    unsigned char colorMask[] = {0, 0, 0, 0}, depthMask = 0;
    237237    unsigned int stencilMask = 0xffffffff;
    238238    bool isScissorEnabled = false;
  • trunk/WebCore/html/canvas/WebGLProgram.cpp

    r69804 r73244  
    6868        return false;
    6969    GraphicsContext3D* context3d = context()->graphicsContext3D();
    70     int linkStatus;
     70    int linkStatus = 0;
    7171    context3d->getProgramiv(object(), GraphicsContext3D::LINK_STATUS, &linkStatus);
    7272    if (!linkStatus)
  • trunk/WebCore/html/canvas/WebGLRenderingContext.cpp

    r72610 r73244  
    13761376    if (numShaders) {
    13771377        OwnArrayPtr<unsigned int> shaders(new unsigned int[numShaders]);
    1378         int count;
     1378        int count = 0;
    13791379        m_context->getAttachedShaders(objectOrZero(program), numShaders, &count, shaders.get());
    13801380        if (count != numShaders)
     
    14161416
    14171417    WebGLStateRestorer(this, false);
    1418     int value;
     1418    int value = 0;
    14191419    m_context->getBufferParameteriv(target, pname, &value);
    14201420    if (pname == GraphicsContext3D::BUFFER_SIZE)
     
    14601460    if (pname != GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) {
    14611461        WebGLStateRestorer(this, false);
    1462         int value;
     1462        int value = 0;
    14631463        m_context->getFramebufferAttachmentParameteriv(target, attachment, pname, &value);
    14641464        if (pname == GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)
     
    33533353WebGLGetInfo WebGLRenderingContext::getBooleanParameter(unsigned long pname)
    33543354{
    3355     unsigned char value;
     3355    unsigned char value = 0;
    33563356    m_context->getBooleanv(pname, &value);
    33573357    return WebGLGetInfo(static_cast<bool>(value));
     
    33743374WebGLGetInfo WebGLRenderingContext::getFloatParameter(unsigned long pname)
    33753375{
    3376     float value;
     3376    float value = 0;
    33773377    m_context->getFloatv(pname, &value);
    33783378    return WebGLGetInfo(static_cast<float>(value));
     
    33863386WebGLGetInfo WebGLRenderingContext::getLongParameter(unsigned long pname)
    33873387{
    3388     int value;
     3388    int value = 0;
    33893389    m_context->getIntegerv(pname, &value);
    33903390    return WebGLGetInfo(static_cast<long>(value));
     
    33933393WebGLGetInfo WebGLRenderingContext::getUnsignedLongParameter(unsigned long pname)
    33943394{
    3395     int value;
     3395    int value = 0;
    33963396    m_context->getIntegerv(pname, &value);
    33973397    unsigned int uValue = static_cast<unsigned int>(value);
  • trunk/WebCore/platform/graphics/chromium/LayerChromium.cpp

    r72021 r73244  
    6060    GLC(context, context->shaderSource(shader, sourceString));
    6161    GLC(context, context->compileShader(shader));
    62     int compiled;
     62    int compiled = 0;
    6363    GLC(context, context->getShaderiv(shader, GraphicsContext3D::COMPILE_STATUS, &compiled));
    6464    if (!compiled) {
     
    229229
    230230    GLC(context, context->linkProgram(programObject));
    231     int linked;
     231    int linked = 0;
    232232    GLC(context, context->getProgramiv(programObject, GraphicsContext3D::LINK_STATUS, &linked));
    233233    if (!linked) {
  • trunk/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp

    r72770 r73244  
    844844
    845845    // Get the max texture size supported by the system.
     846    m_maxTextureSize = 0;
    846847    GLC(m_context, m_context->getIntegerv(GraphicsContext3D::MAX_TEXTURE_SIZE, &m_maxTextureSize));
    847848
  • trunk/WebCore/platform/graphics/gpu/DrawingBuffer.cpp

    r72431 r73244  
    114114    // resize multisample FBO
    115115    if (multisample()) {
    116         int maxSampleCount;
     116        int maxSampleCount = 0;
    117117       
    118118        m_context->getIntegerv(Extensions3D::MAX_SAMPLES, &maxSampleCount);
  • trunk/WebCore/platform/graphics/gpu/Shader.cpp

    r68802 r73244  
    9292    context->attachShader(program, fragmentShader);
    9393    context->linkProgram(program);
    94     int linkStatus;
     94    int linkStatus = 0;
    9595    context->getProgramiv(program, GraphicsContext3D::LINK_STATUS, &linkStatus);
    9696    if (!linkStatus)
Note: See TracChangeset for help on using the changeset viewer.