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

Unified Diff: third_party/WebKit/Source/platform/geometry/IntRect.h

Issue 1393083003: Implement interest rects for synchronized paint. (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/platform/geometry/IntRect.h
diff --git a/third_party/WebKit/Source/platform/geometry/IntRect.h b/third_party/WebKit/Source/platform/geometry/IntRect.h
index 70f5a9a3321aa24250b8b0eec2e7f36d22bed623..e06105496fe807484006a6783496858be08623ff 100644
--- a/third_party/WebKit/Source/platform/geometry/IntRect.h
+++ b/third_party/WebKit/Source/platform/geometry/IntRect.h
@@ -27,6 +27,7 @@
#define IntRect_h
#include "platform/geometry/IntPoint.h"
+#include "platform/geometry/IntRectOutsets.h"
#include "wtf/FastAllocBase.h"
#include "wtf/Vector.h"
#include "wtf/VectorTraits.h"
@@ -89,6 +90,12 @@ public:
void expand(const IntSize& size) { m_size += size; }
void expand(int dw, int dh) { m_size.expand(dw, dh); }
+ void expand(const IntRectOutsets& outsets)
+ {
+ m_location.move(-outsets.left(), -outsets.top());
+ m_size.expand(outsets.left() + outsets.right(), outsets.top() + outsets.bottom());
+ }
+
void contract(const IntSize& size) { m_size -= size; }
void contract(int dw, int dh) { m_size.expand(-dw, -dh); }

Powered by Google App Engine
This is Rietveld 408576698