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

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

Issue 2784963002: Optimize the pre-paint tree walk and ClipRects (Closed)
Patch Set: none 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 c8c9997210916a09096da5956ca019e27a33e228..7881ba855292f0f69b804a108dadef9f7c7dc5ca 100644
--- a/third_party/WebKit/Source/core/paint/ClipRects.h
+++ b/third_party/WebKit/Source/core/paint/ClipRects.h
@@ -27,20 +27,24 @@
#define ClipRects_h
#include "core/paint/ClipRect.h"
-#include "wtf/RefCounted.h"
namespace blink {
-class ClipRects : public RefCounted<ClipRects> {
+class 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;
@@ -78,18 +82,6 @@ class ClipRects : public RefCounted<ClipRects> {
}
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;

Powered by Google App Engine
This is Rietveld 408576698