Commit 5d003813 authored by vollick@chromium.org's avatar vollick@chromium.org

Remove IntSize::area, and rename IntSize::area_safe() to IntSize::area()

IntSize::area_safe was not named correctly for blink, and the old area
function should have been deprecated anyhow. This CL cleans this up.

Review URL: https://codereview.chromium.org/226523005

git-svn-id: svn://svn.chromium.org/blink/trunk@171363 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 23ce55b3
......@@ -656,8 +656,8 @@ bool RenderLayerCompositor::squashingWouldExceedSparsityTolerance(const RenderLa
IntRect bounds = candidate->ancestorDependentProperties().clippedAbsoluteBoundingBox;
IntRect newBoundingRect = squashingState.boundingRect;
newBoundingRect.unite(bounds);
const uint64_t newBoundingRectArea = newBoundingRect.size().area_safe();
const uint64_t newSquashedArea = squashingState.totalAreaOfSquashedRects + bounds.size().area_safe();
const uint64_t newBoundingRectArea = newBoundingRect.size().area();
const uint64_t newSquashedArea = squashingState.totalAreaOfSquashedRects + bounds.size().area();
return newBoundingRectArea > gSquashingSparsityTolerance * newSquashedArea;
}
......
......@@ -98,13 +98,8 @@ public:
m_height = minimumSize.height();
}
int area() const
{
return m_width * m_height;
}
// Return area in a uint64_t to avoid overflow.
uint64_t area_safe() const
uint64_t area() const
{
return static_cast<uint64_t>(width()) * height();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment