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

Unified Diff: third_party/WebKit/Source/core/paint/ClipRects.h

Issue 2792833002: Revert of Optimize the pre-paint tree walk and ClipRects (Closed)
Patch Set: Created 3 years, 9 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/ClipRects.h
diff --git a/third_party/WebKit/Source/core/paint/ClipRects.h b/third_party/WebKit/Source/core/paint/ClipRects.h
index 7881ba855292f0f69b804a108dadef9f7c7dc5ca..c8c9997210916a09096da5956ca019e27a33e228 100644
--- a/third_party/WebKit/Source/core/paint/ClipRects.h
+++ b/third_party/WebKit/Source/core/paint/ClipRects.h
@@ -27,24 +27,20 @@
#define ClipRects_h
#include "core/paint/ClipRect.h"
+#include "wtf/RefCounted.h"
namespace blink {
-class ClipRects {
+class ClipRects : public RefCounted<ClipRects> {
USING_FAST_MALLOC(ClipRects);
public:
+ static PassRefPtr<ClipRects> create() { return adoptRef(new ClipRects); }
+ static PassRefPtr<ClipRects> create(const ClipRects& other) {
+ return adoptRef(new ClipRects(other));
+ }
+
ClipRects() : m_fixed(0) {}
- ClipRects(const LayoutRect& r)
- : m_overflowClipRect(r),
- m_fixedClipRect(r),
- m_posClipRect(r),
- m_fixed(0) {}
- ClipRects(const ClipRects& other)
- : m_overflowClipRect(other.overflowClipRect()),
- m_fixedClipRect(other.fixedClipRect()),
- m_posClipRect(other.posClipRect()),
- m_fixed(other.fixed()) {}
void reset(const LayoutRect& r) {
m_overflowClipRect = r;
@@ -82,6 +78,18 @@
}
private:
+ ClipRects(const LayoutRect& r)
+ : m_overflowClipRect(r),
+ m_fixedClipRect(r),
+ m_posClipRect(r),
+ m_fixed(0) {}
+
+ ClipRects(const ClipRects& other)
+ : m_overflowClipRect(other.overflowClipRect()),
+ m_fixedClipRect(other.fixedClipRect()),
+ m_posClipRect(other.posClipRect()),
+ m_fixed(other.fixed()) {}
+
ClipRect m_overflowClipRect;
ClipRect m_fixedClipRect;
ClipRect m_posClipRect;
« no previous file with comments | « third_party/WebKit/Source/core/layout/ClipRects.h ('k') | third_party/WebKit/Source/core/paint/ClipRectsCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698