⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 246091 in webkit


Ignore:
Timestamp:
Jun 4, 2019, 5:26:10 PM (7 years ago)
Author:
Keith Rollin
Message:

Fix 64-bit vs 32-bit mismatch in TileController.cpp
https://bugs.webkit.org/show_bug.cgi?id=198540
<rdar://problem/51410851>

Reviewed by Alex Christensen.

TileController::blankPixelCountForTiles calculates its result as a
uint64_t, but returns it as an unsigned. The former is a 64-bit value,
while the latter can be a 32-bit value on some platforms. This
mismatch can lead to a compile-time error. Fix this by explicitly
casting the 64-bit value to an "unsigned".

No new tests -- no new functionality.

  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::blankPixelCountForTiles):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r246087 r246091  
     12019-06-04  Keith Rollin  <krollin@apple.com>
     2
     3        Fix 64-bit vs 32-bit mismatch in TileController.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=198540
     5        <rdar://problem/51410851>
     6
     7        Reviewed by Alex Christensen.
     8
     9        TileController::blankPixelCountForTiles calculates its result as a
     10        uint64_t, but returns it as an unsigned. The former is a 64-bit value,
     11        while the latter can be a 32-bit value on some platforms. This
     12        mismatch can lead to a compile-time error. Fix this by explicitly
     13        casting the 64-bit value to an "unsigned".
     14
     15        No new tests -- no new functionality.
     16
     17        * platform/graphics/ca/TileController.cpp:
     18        (WebCore::TileController::blankPixelCountForTiles):
     19
    1202019-06-04  Chris Dumez  <cdumez@apple.com>
    221
  • trunk/Source/WebCore/platform/graphics/ca/TileController.cpp

    r245974 r246091  
    651651    uncoveredRegion.subtract(paintedVisibleTiles);
    652652
    653     return uncoveredRegion.totalArea();
     653    return static_cast<unsigned>(uncoveredRegion.totalArea());
    654654}
    655655
Note: See TracChangeset for help on using the changeset viewer.