Changeset 60881 in webkit


Ignore:
Timestamp:
Jun 8, 2010 10:23:23 PM (14 years ago)
Author:
rolandsteiner@chromium.org
Message:

2010-06-08 Roland Steiner <rolandsteiner@chromium.org>

Unreviewed build fix

Bug 38145 - Validate *tex* functions input parameters according to ES2 conformance
https://bugs.webkit.org/show_bug.cgi?id=38145
https://bugs.webkit.org/show_bug.cgi?id=40346

Fix for 38145 broke the build ('log2 not found' on Windows),
the fix from 40346 also didn't catch ('log ambiguous').

2nd quick fix: add explicit casts to double and use double constants.

No new tests.

  • html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::validateTexFuncParameters):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r60880 r60881  
     12010-06-08  Roland Steiner  <rolandsteiner@chromium.org>
     2
     3        Unreviewed build fix
     4
     5        Bug 38145 - Validate *tex* functions input parameters according to ES2 conformance
     6        https://bugs.webkit.org/show_bug.cgi?id=38145
     7        https://bugs.webkit.org/show_bug.cgi?id=40346
     8
     9        Fix for 38145 broke the build ('log2 not found' on Windows),
     10        the fix from 40346 also didn't catch ('log ambiguous').
     11
     12        2nd quick fix: add explicit casts to double and use double constants.
     13
     14        No new tests.
     15
     16        * html/canvas/WebGLRenderingContext.cpp:
     17        (WebCore::WebGLRenderingContext::validateTexFuncParameters):
     18
    1192010-05-18  Yuzo Fujishima  <yuzo@google.com>
    220
  • trunk/WebCore/html/canvas/WebGLRenderingContext.cpp

    r60876 r60881  
    32253225    switch (target) {
    32263226    case GraphicsContext3D::TEXTURE_2D:
    3227         if (width > m_maxTextureSize || height > m_maxTextureSize || level > log(m_maxTextureSize) / log(2)) {
     3227        if (width > m_maxTextureSize ||
     3228            height > m_maxTextureSize ||
     3229            level > log(static_cast<double>(m_maxTextureSize)) / log(2.0)) {
    32283230            m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
    32293231            return false;
     
    32363238    case GraphicsContext3D::TEXTURE_CUBE_MAP_POSITIVE_Z:
    32373239    case GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_Z:
    3238         if (width != height || width > m_maxCubeMapTextureSize || level > log(m_maxCubeMapTextureSize) / log(2)) {
     3240        if (width != height ||
     3241            width > m_maxCubeMapTextureSize ||
     3242            level > log(static_cast<double>(m_maxCubeMapTextureSize)) / log(2.0)) {
    32393243            m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
    32403244            return false;
Note: See TracChangeset for help on using the changeset viewer.