Changeset 84682 in webkit
- Timestamp:
- Apr 22, 2011 2:24:46 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r84648 r84682 1 2011-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 1 12 2011-04-22 Jer Noble <jer.noble@apple.com> 2 13 -
trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
r84524 r84682 525 525 { 526 526 const size_t rectThreshold = 10; 527 const float wastedSpaceThreshold = 0.75f;527 const double wastedSpaceThreshold = 0.75; 528 528 529 529 if (rects.size() <= 1 || rects.size() > rectThreshold) … … 538 538 rectsArea += rects[i].width() * rects[i].height(); 539 539 540 float wastedSpace = 1 - (rectsArea/ boundsArea);540 double wastedSpace = 1 - (static_cast<double>(rectsArea) / boundsArea); 541 541 542 542 return wastedSpace <= wastedSpaceThreshold;
Note: See TracChangeset
for help on using the changeset viewer.