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

Side by Side Diff: third_party/WebKit/Source/platform/MemoryPurgeController.cpp

Issue 1860903002: Update Source/platform/ to assume Oilpan only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: back out ScrollAnimatorMac() accidental change Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/MemoryPurgeController.h" 5 #include "platform/MemoryPurgeController.h"
6 6
7 #include "base/sys_info.h" 7 #include "base/sys_info.h"
8 #include "platform/TraceEvent.h" 8 #include "platform/TraceEvent.h"
9 #include "platform/graphics/ImageDecodingStore.h" 9 #include "platform/graphics/ImageDecodingStore.h"
10 #include "public/platform/Platform.h" 10 #include "public/platform/Platform.h"
(...skipping 11 matching lines...) Expand all
22 22
23 DEFINE_TRACE(MemoryPurgeClient) 23 DEFINE_TRACE(MemoryPurgeClient)
24 { 24 {
25 } 25 }
26 26
27 MemoryPurgeController::MemoryPurgeController() 27 MemoryPurgeController::MemoryPurgeController()
28 : m_deviceKind(base::SysInfo::IsLowEndDevice() ? DeviceKind::LowEnd : Device Kind::NotSpecified) 28 : m_deviceKind(base::SysInfo::IsLowEndDevice() ? DeviceKind::LowEnd : Device Kind::NotSpecified)
29 { 29 {
30 } 30 }
31 31
32 MemoryPurgeController::~MemoryPurgeController()
33 {
34 }
35
36 void MemoryPurgeController::purgeMemory() 32 void MemoryPurgeController::purgeMemory()
37 { 33 {
38 // TODO(bashi): Add UMA 34 // TODO(bashi): Add UMA
39 TRACE_EVENT0("blink", "MemoryPurgeController::purgeMemory"); 35 TRACE_EVENT0("blink", "MemoryPurgeController::purgeMemory");
40 for (auto& client : m_clients) 36 for (auto& client : m_clients)
41 client->purgeMemory(m_deviceKind); 37 client->purgeMemory(m_deviceKind);
42 WTF::Partitions::decommitFreeableMemory(); 38 WTF::Partitions::decommitFreeableMemory();
43 } 39 }
44 40
45 DEFINE_TRACE(MemoryPurgeController) 41 DEFINE_TRACE(MemoryPurgeController)
46 { 42 {
47 #if ENABLE(OILPAN)
48 visitor->trace(m_clients); 43 visitor->trace(m_clients);
49 #endif
50 } 44 }
51 45
52 } // namespace blink 46 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/MemoryPurgeController.h ('k') | third_party/WebKit/Source/platform/Widget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698