Changeset 194751 in webkit


Ignore:
Timestamp:
Jan 7, 2016 6:51:43 PM (8 years ago)
Author:
Brent Fulgham
Message:

Correct missing EXT_sRGB Format Handling
https://bugs.webkit.org/show_bug.cgi?id=152876
<rdar://problem/23284389>

Reviewed by Alex Christensen.

Tested by WebGL 1.0.4 suite.

  • platform/graphics/GraphicsContext3D.cpp:

(getDataFormat): Handle missing SRGB and SRGB_ALPHA cases.

  • platform/graphics/GraphicsContext3D.h: Add missing SRGB_ALPHA value from the Khronos standard.
  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::GraphicsContext3D::texImage2D): Add an assertion that we are not being handed
an internal format to a method that works with normal formats.

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r194750 r194751  
     12016-01-07  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Correct missing EXT_sRGB Format Handling
     4        https://bugs.webkit.org/show_bug.cgi?id=152876
     5        <rdar://problem/23284389>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Tested by WebGL 1.0.4 suite.
     10
     11        * platform/graphics/GraphicsContext3D.cpp:
     12        (getDataFormat): Handle missing SRGB and SRGB_ALPHA cases.
     13        * platform/graphics/GraphicsContext3D.h: Add missing SRGB_ALPHA value from the Khronos standard.
     14        * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
     15        (WebCore::GraphicsContext3D::texImage2D): Add an assertion that we are not being handed
     16        an internal format to a method that works with normal formats.
     17
    1182016-01-07  Simon Fraser  <simon.fraser@apple.com>
    219
  • trunk/Source/WebCore/platform/graphics/GraphicsContext3D.cpp

    r183432 r194751  
    6363            dstFormat = GraphicsContext3D::DataFormatRA8;
    6464            break;
     65        case GraphicsContext3D::SRGB:
     66            dstFormat = GraphicsContext3D::DataFormatRGB8;
     67            break;
     68        case GraphicsContext3D::SRGB_ALPHA:
     69            dstFormat = GraphicsContext3D::DataFormatRGBA8;
     70            break;
    6571        default:
    6672            ASSERT_NOT_REACHED();
     
    9399            dstFormat = GraphicsContext3D::DataFormatRA16F;
    94100            break;
     101        case GraphicsContext3D::SRGB:
     102            dstFormat = GraphicsContext3D::DataFormatRGB16F;
     103            break;
     104        case GraphicsContext3D::SRGB_ALPHA:
     105            dstFormat = GraphicsContext3D::DataFormatRGBA16F;
     106            break;
    95107        default:
    96108            ASSERT_NOT_REACHED();
     
    113125        case GraphicsContext3D::LUMINANCE_ALPHA:
    114126            dstFormat = GraphicsContext3D::DataFormatRA32F;
     127            break;
     128        case GraphicsContext3D::SRGB:
     129            dstFormat = GraphicsContext3D::DataFormatRGB32F;
     130            break;
     131        case GraphicsContext3D::SRGB_ALPHA:
     132            dstFormat = GraphicsContext3D::DataFormatRGBA32F;
    115133            break;
    116134        default:
  • trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h

    r193780 r194751  
    505505        SRGB = 0x8C40,
    506506        SRGB8 = 0x8C41,
     507        SRGB_ALPHA = 0x8C42,
    507508        SRGB8_ALPHA8 = 0x8C43,
    508509        COMPARE_REF_TO_TEXTURE = 0x884E,
  • trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp

    r193723 r194751  
    356356    }
    357357
     358    ASSERT(format != Extensions3D::SRGB8_ALPHA8_EXT);
    358359    if (format == Extensions3D::SRGB_ALPHA_EXT)
    359360        openGLFormat = GL_RGBA;
Note: See TracChangeset for help on using the changeset viewer.