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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2130683002: [Experiment] purge-and-suspend Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 4 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: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 687b58d8451b0789bb81f5d439dc29cfbdc80004..a2df7775f48a3aa13eebbc6a15add681eacf4b9e 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -4292,4 +4292,19 @@ bool FrameView::canThrottleRendering() const
return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrottling);
}
+void FrameView::purgeMemory()
+{
+ LayoutViewItem viewItem = layoutViewItem();
+ DCHECK(!viewItem.isNull());
+
+ PaintLayer* layer = viewItem.layer();
+ DCHECK(layer);
+ if (!layer->hasCompositedLayerMapping())
+ return;
+ GraphicsLayer* rootGraphicsLayer = layer->compositedLayerMapping()->mainGraphicsLayer();
+ if (!rootGraphicsLayer->drawsContent())
+ return;
+ rootGraphicsLayer->getPaintController().invalidateAll();
esprehn 2016/08/05 23:00:58 This is only the main graphics layer, what about a
tasak 2016/08/08 04:47:36 I see. I would like to traverse all children and t
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698