Changeset 139182 in webkit


Ignore:
Timestamp:
Jan 9, 2013 3:25:12 AM (11 years ago)
Author:
zeno.albisser@digia.com
Message:

[Qt][Mac] GraphicsSurface does not need glEnable/glDisable for texture targets.
https://bugs.webkit.org/show_bug.cgi?id=106310

glEnable/glDisable for texture targets is only necessary
when using the fixed function pipeline.
Enabling or disabling the target might cause unexpected
behavior to texture bindings and is therefore considered harmful.

Reviewed by Noam Rosenthal.

  • platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:

(WebCore::createTexture):
(WebCore::GraphicsSurfacePrivate::copyFromTexture):
(WebCore::GraphicsSurface::platformCopyToGLTexture):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r139174 r139182  
     12013-01-09  Zeno Albisser  <zeno@webkit.org>
     2
     3        [Qt][Mac] GraphicsSurface does not need glEnable/glDisable for texture targets.
     4        https://bugs.webkit.org/show_bug.cgi?id=106310
     5
     6        glEnable/glDisable for texture targets is only necessary
     7        when using the fixed function pipeline.
     8        Enabling or disabling the target might cause unexpected
     9        behavior to texture bindings and is therefore considered harmful.
     10
     11        Reviewed by Noam Rosenthal.
     12
     13        * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
     14        (WebCore::createTexture):
     15        (WebCore::GraphicsSurfacePrivate::copyFromTexture):
     16        (WebCore::GraphicsSurface::platformCopyToGLTexture):
     17
    1182013-01-09  Kunihiko Sakamoto  <ksakamoto@chromium.org>
    219
  • trunk/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp

    r137498 r139182  
    5151
    5252    GLint prevTexture;
    53     GLboolean wasEnabled = glIsEnabled(GL_TEXTURE_RECTANGLE_ARB);
    5453    glGetIntegerv(GL_TEXTURE_RECTANGLE_ARB, &prevTexture);
    55     if (!wasEnabled)
    56         glEnable(GL_TEXTURE_RECTANGLE_ARB);
    5754
    5855    glGenTextures(1, &texture);
     
    6562
    6663    glBindTexture(GL_TEXTURE_RECTANGLE_ARB, prevTexture);
    67     if (!wasEnabled)
    68         glDisable(GL_TEXTURE_RECTANGLE_ARB);
    6964
    7065    return texture;
     
    217212
    218213        makeCurrent();
    219         glEnable(GL_TEXTURE_RECTANGLE_ARB);
    220214
    221215        int x = sourceRect.x();
     
    320314        glGenFramebuffers(1, &m_fbo);
    321315    glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 0);
    322     glEnable(GL_TEXTURE_RECTANGLE_ARB);
    323     glEnable(target);
    324316    glBindTexture(target, id);
    325317    glBindFramebuffer(GL_READ_FRAMEBUFFER, m_fbo);
Note: See TracChangeset for help on using the changeset viewer.