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

Unified Diff: Source/core/layout/LayoutView.h

Issue 1303203002: Add MemoryPurgeController (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | Source/core/layout/LayoutView.cpp » ('j') | Source/platform/MemoryPurgeController.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutView.h
diff --git a/Source/core/layout/LayoutView.h b/Source/core/layout/LayoutView.h
index 529c46a31e4e053289d9dc4bdf09272df60326ee..2d6d401e8f4b339dd1fd4ec6e61c7e8a5e4ac79d 100644
--- a/Source/core/layout/LayoutView.h
+++ b/Source/core/layout/LayoutView.h
@@ -32,6 +32,7 @@
#include "core/layout/LayoutState.h"
#include "core/layout/PaintInvalidationState.h"
#include "core/layout/PendingSelection.h"
+#include "platform/MemoryPurgeController.h"
#include "platform/PODFreeListArena.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/heap/Handle.h"
@@ -47,7 +48,9 @@ class LayoutQuote;
// It's dimensions match that of the logical viewport (which may be different from
// the visible viewport in fixed-layout mode), and it is always at position (0,0)
// relative to the document (and so isn't necessarily in view).
-class CORE_EXPORT LayoutView final : public LayoutBlockFlow {
+// TODO(bashi): Remove MemoryPurgeEventListener. This just demonstrate how
+// MemoryPurgeController works.
+class CORE_EXPORT LayoutView final : public MemoryPurgeEventListener, public LayoutBlockFlow {
public:
explicit LayoutView(Document*);
~LayoutView() override;
@@ -192,6 +195,8 @@ public:
void setCompositedDisplayList(PassOwnPtr<const CompositedDisplayList> compositedDisplayList) { m_compositedDisplayList = compositedDisplayList; }
const CompositedDisplayList* compositedDisplayList() const { return m_compositedDisplayList.get(); }
+ void purgeMemory(MemoryPurgeMode, DeviceKind) override;
+
private:
void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr, const PaintInvalidationState* = nullptr) const override;
« no previous file with comments | « no previous file | Source/core/layout/LayoutView.cpp » ('j') | Source/platform/MemoryPurgeController.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698