Chromium Code Reviews| 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 |