Changeset 128047 in webkit


Ignore:
Timestamp:
Sep 10, 2012 5:34:52 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[TexMap] Fix compilation on Windows
https://bugs.webkit.org/show_bug.cgi?id=96257

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-09-10
Reviewed by Noam Rosenthal.

TextureMapperGL uses near and far as variable names and unfortunately
WinDefs.h on Windows has the nasty habit of unconditionally(!) defining
near and far as empty macros. There's no way to prevent WinDefs.h from
doing so. Instead we rename the variables. (Another option would've been to
#undef)

  • platform/graphics/texmap/TextureMapperGL.cpp:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r128043 r128047  
     12012-09-10  Simon Hausmann  <simon.hausmann@nokia.com>
     2
     3        [TexMap] Fix compilation on Windows
     4        https://bugs.webkit.org/show_bug.cgi?id=96257
     5
     6        Reviewed by Noam Rosenthal.
     7
     8        TextureMapperGL uses near and far as variable names and unfortunately
     9        WinDefs.h on Windows has the nasty habit of unconditionally(!) defining
     10        near and far as empty macros. There's no way to prevent WinDefs.h from
     11        doing so. Instead we rename the variables. (Another option would've been to
     12        #undef)
     13
     14        * platform/graphics/texmap/TextureMapperGL.cpp:
     15
    1162012-09-10  Alexander Pavlov  <apavlov@chromium.org>
    217
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp

    r127063 r128047  
    751751static inline TransformationMatrix createProjectionMatrix(const IntSize& size, bool mirrored)
    752752{
    753     const float near = 9999999;
    754     const float far = -99999;
     753    const float nearValue = 9999999;
     754    const float farValue = -99999;
    755755
    756756    return TransformationMatrix(2.0 / float(size.width()), 0, 0, 0,
    757757                                0, (mirrored ? 2.0 : -2.0) / float(size.height()), 0, 0,
    758                                 0, 0, -2.f / (far - near), 0,
    759                                 -1, mirrored ? -1 : 1, -(far + near) / (far - near), 1);
     758                                0, 0, -2.f / (farValue - nearValue), 0,
     759                                -1, mirrored ? -1 : 1, -(farValue + nearValue) / (farValue - nearValue), 1);
    760760}
    761761
Note: See TracChangeset for help on using the changeset viewer.