Chromium Code Reviews| Index: content/child/blink_platform_impl.cc |
| diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc |
| index 94eaffa8859985a83725547917291cf3e7b1e4ef..2a7ff521f7726bd650a021a5d223ecc3edd32dde 100644 |
| --- a/content/child/blink_platform_impl.cc |
| +++ b/content/child/blink_platform_impl.cc |
| @@ -360,7 +360,9 @@ BlinkPlatformImpl::BlinkPlatformImpl() |
| BlinkPlatformImpl::BlinkPlatformImpl( |
| scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) |
| : main_thread_task_runner_(main_thread_task_runner), |
| - compositor_thread_(nullptr) { |
| + compositor_thread_(nullptr), |
| + physical_memory_mb_( |
| + static_cast<size_t>(base::SysInfo::AmountOfPhysicalMemoryMB())) { |
|
kinuko
2017/05/25 05:31:27
Hum, this doesn't seem we need public platform plu
|
| InternalInit(); |
| } |
| @@ -777,6 +779,15 @@ size_t BlinkPlatformImpl::ActualMemoryUsageMB() { |
| return GetMemoryUsageKB() >> 10; |
| } |
| +size_t BlinkPlatformImpl::AmountOfPhysicalMemoryMB() { |
| + return physical_memory_mb_; |
| +} |
| + |
| +void BlinkPlatformImpl::SetDevicePhysicalMemoryMBForTesting( |
| + int64_t physical_memory_mb) { |
| + physical_memory_mb_ = static_cast<size_t>(physical_memory_mb); |
| +} |
| + |
| size_t BlinkPlatformImpl::NumberOfProcessors() { |
| return static_cast<size_t>(base::SysInfo::NumberOfProcessors()); |
| } |