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

Unified Diff: Source/core/testing/LayerRect.h

Issue 17471008: Rework compositor touch hit testing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Various fixes and test additions Created 7 years, 5 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: Source/core/testing/LayerRect.h
diff --git a/Source/core/testing/MallocStatistics.h b/Source/core/testing/LayerRect.h
similarity index 67%
copy from Source/core/testing/MallocStatistics.h
copy to Source/core/testing/LayerRect.h
index 3f07bbd9f71b0db1351ade2ed88e3c0b9fa69fa6..eddfc0a31b85acd70d6d1a8df6bb3cba5ecb03fb 100644
--- a/Source/core/testing/MallocStatistics.h
+++ b/Source/core/testing/LayerRect.h
@@ -23,30 +23,38 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MallocStatistics_h
-#define MallocStatistics_h
+#ifndef LayerRect_h
+#define LayerRect_h
-#include <wtf/FastMalloc.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+#include "core/dom/ClientRect.h"
+
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
-class MallocStatistics : public RefCounted<MallocStatistics> {
+class Node;
+
+class LayerRect : public RefCounted<LayerRect> {
public:
- static PassRefPtr<MallocStatistics> create() { return adoptRef(new MallocStatistics()); }
+ static PassRefPtr<LayerRect> create(PassRefPtr<Node> node, PassRefPtr<ClientRect> rect)
+ {
+ return adoptRef(new LayerRect(node, rect));
+ }
- size_t reservedVMBytes() const { return m_stats.reservedVMBytes; }
- size_t committedVMBytes() const { return m_stats.committedVMBytes; }
- size_t freeListBytes() const { return m_stats.freeListBytes; }
+ Node* layerRootNode() const { return m_layerRootNode.get(); }
+ ClientRect* layerRelativeRect() const { return m_rect.get(); }
private:
- MallocStatistics()
+ LayerRect(PassRefPtr<Node> node, PassRefPtr<ClientRect> rect)
+ : m_layerRootNode(node)
+ , m_rect(rect)
{
- m_stats = WTF::fastMallocStatistics();
}
- WTF::FastMallocStatistics m_stats;
+ RefPtr<Node> m_layerRootNode;
+ RefPtr<ClientRect> m_rect;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698