Index: third_party/WebKit/Source/platform/graphics/paint/CullRect.h |
diff --git a/third_party/WebKit/Source/platform/graphics/paint/CullRect.h b/third_party/WebKit/Source/platform/graphics/paint/CullRect.h |
index 20ca2ad43f16c4fdd0d91fa15d48ee2d3ce17d92..b96bff08d322046744ae62d5a491d555b6fa206c 100644 |
--- a/third_party/WebKit/Source/platform/graphics/paint/CullRect.h |
+++ b/third_party/WebKit/Source/platform/graphics/paint/CullRect.h |
@@ -10,7 +10,6 @@ |
#include "wtf/Allocator.h" |
#include "wtf/HashMap.h" |
#include "wtf/ListHashSet.h" |
-#include "wtf/text/WTFString.h" |
#include <limits> |
@@ -24,6 +23,7 @@ class PLATFORM_EXPORT CullRect { |
DISALLOW_NEW(); |
public: |
+ CullRect() {} |
explicit CullRect(const IntRect& rect) : m_rect(rect) {} |
CullRect(const CullRect&, const IntPoint& offset); |
CullRect(const CullRect&, const IntSize& offset); |
@@ -36,11 +36,11 @@ class PLATFORM_EXPORT CullRect { |
bool intersectsHorizontalRange(LayoutUnit lo, LayoutUnit hi) const; |
bool intersectsVerticalRange(LayoutUnit lo, LayoutUnit hi) const; |
- String toString() const { return m_rect.toString(); } |
chrishtr
2016/11/11 19:02:16
Why remove this?
Xianzhu
2016/11/11 19:13:25
Sorry, this is a mistake when cherry-picking this
|
- |
private: |
IntRect m_rect; |
+ friend bool operator==(const CullRect&, const CullRect&); |
+ |
// TODO(chrishtr): temporary while we implement CullRect everywhere. |
friend class FramePainter; |
friend class GridPainter; |
@@ -53,6 +53,13 @@ class PLATFORM_EXPORT CullRect { |
friend class WebPluginContainerImpl; |
}; |
+inline bool operator==(const CullRect& a, const CullRect& b) { |
+ return a.m_rect == b.m_rect; |
+} |
+inline bool operator!=(const CullRect& a, const CullRect& b) { |
+ return !(a == b); |
+} |
+ |
} // namespace blink |
#endif // CullRect_h |