Changeset 137294 in webkit


Ignore:
Timestamp:
Dec 11, 2012 4:54:59 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL][WebGL] Regression(r137211) WebGL is broken with NVIDIA Drivers.
https://bugs.webkit.org/show_bug.cgi?id=104652.

Patch by Kondapally Kalyan <kalyan.kondapally@intel.com> on 2012-12-11
Reviewed by Kenneth Rohde Christiansen.

Reverting some of the changes from r137211, as it causes regressions
on NVIDIA drivers.

  • platform/graphics/efl/GraphicsContext3DEfl.cpp:

(WebCore::GraphicsContext3D::GraphicsContext3D):

  • platform/graphics/efl/GraphicsContext3DPrivate.cpp:

(GraphicsContext3DPrivate::copyToGraphicsSurface):

  • platform/graphics/opengl/GLPlatformSurface.cpp:

(WebCore::GLPlatformSurface::updateContents):

  • platform/graphics/opengl/GLPlatformSurface.h:

(GLPlatformSurface):

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r137292 r137294  
     12012-12-11  Kondapally Kalyan  <kalyan.kondapally@intel.com>
     2
     3        [EFL][WebGL] Regression(r137211) WebGL is broken with NVIDIA Drivers.
     4        https://bugs.webkit.org/show_bug.cgi?id=104652.
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Reverting some of the changes from r137211, as it causes regressions
     9        on NVIDIA drivers.
     10
     11        * platform/graphics/efl/GraphicsContext3DEfl.cpp:
     12        (WebCore::GraphicsContext3D::GraphicsContext3D):
     13        * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
     14        (GraphicsContext3DPrivate::copyToGraphicsSurface):
     15        * platform/graphics/opengl/GLPlatformSurface.cpp:
     16        (WebCore::GLPlatformSurface::updateContents):
     17        * platform/graphics/opengl/GLPlatformSurface.h:
     18        (GLPlatformSurface):
     19
    1202012-12-11  Pavel Feldman  <pfeldman@chromium.org>
    221
  • trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp

    r137211 r137294  
    8181    if (renderStyle == RenderOffscreen) {
    8282        // Create buffers for the canvas FBO.
    83         m_private->m_platformSurface->initialize(&m_fbo);
     83        glGenFramebuffers(/* count */ 1, &m_fbo);
    8484
    8585        // Create a texture to render into.
  • trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp

    r137211 r137294  
    159159    }
    160160
    161     m_platformSurface->updateContents(m_context->m_boundFBO);
     161    m_platformSurface->updateContents(m_context->m_texture, m_context->m_boundFBO, m_context->m_boundTexture0);
    162162
    163163    if (enableScissorTest)
  • trunk/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp

    r137211 r137294  
    7373}
    7474
    75 void GLPlatformSurface::initialize(GLuint* frameBufferId)
    76 {
    77     if (!m_fboId)
    78         glGenFramebuffers(1, &m_fboId);
    79 
    80     *frameBufferId = m_fboId;
    81 }
    82 
    8375PlatformSurface GLPlatformSurface::handle() const
    8476{
     
    10698}
    10799
    108 void GLPlatformSurface::updateContents(const GLuint bindFboId)
     100void GLPlatformSurface::updateContents(const uint32_t texture, const GLuint bindFboId, const uint32_t bindTexture)
    109101{
    110102    if (!m_fboId)
    111         return;
     103        glGenFramebuffers(1, &m_fboId);
    112104
    113105    m_restoreNeeded = false;
     
    119111
    120112    glBindFramebuffer(GL_READ_FRAMEBUFFER, m_fboId);
     113    glBindTexture(GL_TEXTURE_2D, texture);
     114    glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, 0);
    121115    glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
    122116    // Use NEAREST as no scale is performed during the blit.
    123117    glBlitFramebuffer(x, y, width, height, x, y, width, height, GL_COLOR_BUFFER_BIT, GL_NEAREST);
    124118    swapBuffers();
     119    glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
     120    glBindTexture(GL_TEXTURE_2D, bindTexture);
    125121    glBindFramebuffer(GL_FRAMEBUFFER, bindFboId);
    126122}
  • trunk/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.h

    r137211 r137294  
    5353    const IntRect& geometry() const;
    5454
    55     // Creates FBO used by the surface. Buffers can be bound to this FBO.
    56     void initialize(GLuint* frameBufferId);
    57 
    5855    // Get the underlying platform specific surface handle.
    5956    PlatformSurface handle() const;
     
    6360    virtual void swapBuffers();
    6461
    65     // Convenience Function to update surface contents.
     62    // Convenience Function to update surface backbuffer with texture contents, restore current FBO and Texture.
    6663    // Function does the following(in order):
    67     // a) Blits back buffer contents to front buffer.
     64    // a) Blits texture contents to back buffer.
    6865    // b) Calls Swap Buffers.
    6966    // c) Sets current FBO as bindFboId.
    70     virtual void updateContents(const GLuint bindFboId);
     67    virtual void updateContents(const uint32_t texture, const GLuint bindFboId, const uint32_t bindTexture);
    7168
    7269    virtual void setGeometry(const IntRect& newRect);
Note: See TracChangeset for help on using the changeset viewer.