Index: third_party/WebKit/Source/platform/graphics/paint/CullRect.cpp |
diff --git a/third_party/WebKit/Source/core/paint/PaintInfo.cpp b/third_party/WebKit/Source/platform/graphics/paint/CullRect.cpp |
similarity index 67% |
copy from third_party/WebKit/Source/core/paint/PaintInfo.cpp |
copy to third_party/WebKit/Source/platform/graphics/paint/CullRect.cpp |
index b930437394c1838896126960ea21f7e1f2361083..0ad4b18a9d781f3e8b5273125b521a2084ae1ddb 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintInfo.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/paint/CullRect.cpp |
@@ -3,31 +3,23 @@ |
// found in the LICENSE file. |
#include "config.h" |
-#include "core/paint/PaintInfo.h" |
+#include "platform/graphics/paint/CullRect.h" |
-namespace blink { |
- |
-void PaintInfo::updatePaintingRootForChildren(const LayoutObject* layoutObject) |
-{ |
- if (!paintingRoot) |
- return; |
+#include "platform/geometry/FloatRect.h" |
+#include "platform/geometry/LayoutRect.h" |
- // If we're the painting root, kids draw normally, and see root of nullptr. |
- if (paintingRoot == layoutObject) { |
- paintingRoot = nullptr; |
- return; |
- } |
-} |
+namespace blink { |
-bool PaintInfo::shouldPaintWithinRoot(const LayoutObject* layoutObject) const |
+CullRect::CullRect(const CullRect& cullRect, const IntPoint& offset) |
{ |
- return !paintingRoot || paintingRoot == layoutObject; |
+ m_rect = cullRect.m_rect; |
+ m_rect.moveBy(offset); |
} |
-CullRect::CullRect(const CullRect& cullRect, const IntPoint& offset) |
+CullRect::CullRect(const CullRect& cullRect, const IntSize& offset) |
{ |
m_rect = cullRect.m_rect; |
- m_rect.moveBy(offset); |
+ m_rect.move(offset); |
} |
bool CullRect::intersectsCullRect(const IntRect& boundingBox) const |
@@ -55,11 +47,6 @@ 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()) |