A quick early-out for Region::contains() test
[WebKit-https.git] / Source / WebCore / platform / graphics / Region.cpp
index 4f6324caeb7012846785b35006aa5734de42cfe4..5f29de7591e50e8ca476de26c10d3067e7b05844 100644 (file)
@@ -67,6 +67,9 @@ Vector<IntRect> Region::rects() const
 
 bool Region::contains(const Region& region) const
 {
+    if (!m_bounds.contains(region.m_bounds))
+        return false;
+
     return WebCore::intersect(region, *this) == region;
 }