Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1844)

Unified Diff: third_party/WebKit/Source/core/paint/PaintInfo.cpp

Issue 1422493003: Change Widget subclasses to use a CullRect instead of an IntRect for painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/PaintInfo.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintInfo.cpp b/third_party/WebKit/Source/core/paint/PaintInfo.cpp
index b930437394c1838896126960ea21f7e1f2361083..41a000812942b11cbdc2874fbc6a06e6672260a1 100644
--- a/third_party/WebKit/Source/core/paint/PaintInfo.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintInfo.cpp
@@ -24,46 +24,9 @@ bool PaintInfo::shouldPaintWithinRoot(const LayoutObject* layoutObject) const
return !paintingRoot || paintingRoot == layoutObject;
}
-CullRect::CullRect(const CullRect& cullRect, const IntPoint& offset)
-{
- m_rect = cullRect.m_rect;
- m_rect.moveBy(offset);
-}
-
-bool CullRect::intersectsCullRect(const IntRect& boundingBox) const
-{
- return boundingBox.intersects(m_rect);
-}
-
-bool CullRect::intersectsCullRect(const AffineTransform& transform, const FloatRect& boundingBox) const
-{
- return transform.mapRect(boundingBox).intersects(m_rect);
-}
-
-bool CullRect::intersectsCullRect(const LayoutRect& rectArg) const
-{
- return m_rect.intersects(enclosingIntRect(rectArg));
-}
-
-bool CullRect::intersectsHorizontalRange(LayoutUnit lo, LayoutUnit hi) const
-{
- return !(lo >= m_rect.maxX() || hi <= m_rect.x());
-}
-
-bool CullRect::intersectsVerticalRange(LayoutUnit lo, LayoutUnit hi) const
-{
- return !(lo >= m_rect.maxY() || hi <= m_rect.y());
-}
-
void PaintInfo::updateCullRect(const AffineTransform& localToParentTransform)
{
m_cullRect.updateCullRect(localToParentTransform);
}
-void CullRect::updateCullRect(const AffineTransform& localToParentTransform)
-{
- if (m_rect != LayoutRect::infiniteIntRect())
- m_rect = localToParentTransform.inverse().mapRect(m_rect);
-}
-
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintInfo.h ('k') | third_party/WebKit/Source/core/paint/PartPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698