Changeset 84682 in webkit


Ignore:
Timestamp:
Apr 22, 2011 2:24:46 PM (13 years ago)
Author:
mitz@apple.com
Message:

Paint the bounding rect of the dirty region instead of individual rectangles when the region
covers at least 3/4 of its bounds.

Reviewed by Sam Weinig.

  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::shouldPaintBoundsRect): Use floating point math so that the logic that was supposed to
achieve this actually works.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r84648 r84682  
     12011-04-22  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Paint the bounding rect of the dirty region instead of individual rectangles when the region
     6        covers at least 3/4 of its bounds.
     7
     8        * WebProcess/WebPage/DrawingAreaImpl.cpp:
     9        (WebKit::shouldPaintBoundsRect): Use floating point math so that the logic that was supposed to
     10        achieve this actually works.
     11
    1122011-04-22  Jer Noble  <jer.noble@apple.com>
    213
  • trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp

    r84524 r84682  
    525525{
    526526    const size_t rectThreshold = 10;
    527     const float wastedSpaceThreshold = 0.75f;
     527    const double wastedSpaceThreshold = 0.75;
    528528
    529529    if (rects.size() <= 1 || rects.size() > rectThreshold)
     
    538538        rectsArea += rects[i].width() * rects[i].height();
    539539
    540     float wastedSpace = 1 - (rectsArea / boundsArea);
     540    double wastedSpace = 1 - (static_cast<double>(rectsArea) / boundsArea);
    541541
    542542    return wastedSpace <= wastedSpaceThreshold;
Note: See TracChangeset for help on using the changeset viewer.