| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1870 // memory-infra. | 1870 // memory-infra. |
| 1871 UMA_HISTOGRAM_MEMORY_MB("PurgeAndSuspend.Memory.V8MainThreadIsolateMB", | 1871 UMA_HISTOGRAM_MEMORY_MB("PurgeAndSuspend.Memory.V8MainThreadIsolateMB", |
| 1872 v8_usage / 1024 / 1024); | 1872 v8_usage / 1024 / 1024); |
| 1873 UMA_HISTOGRAM_MEMORY_MB("PurgeAndSuspend.Memory.TotalAllocatedMB", | 1873 UMA_HISTOGRAM_MEMORY_MB("PurgeAndSuspend.Memory.TotalAllocatedMB", |
| 1874 (blink_stats.partitionAllocTotalAllocatedBytes + | 1874 (blink_stats.partitionAllocTotalAllocatedBytes + |
| 1875 blink_stats.blinkGCTotalAllocatedBytes + | 1875 blink_stats.blinkGCTotalAllocatedBytes + |
| 1876 malloc_usage + v8_usage + discardable_usage) / | 1876 malloc_usage + v8_usage + discardable_usage) / |
| 1877 1024 / 1024); | 1877 1024 / 1024); |
| 1878 } | 1878 } |
| 1879 | 1879 |
| 1880 void RenderThreadImpl::OnProcessResume() { |
| 1881 ChildThreadImpl::OnProcessResume(); |
| 1882 if (!is_renderer_suspended_) |
| 1883 return; |
| 1884 |
| 1885 is_renderer_suspended_ = false; |
| 1886 renderer_scheduler_->ResumeRenderer(); |
| 1887 } |
| 1888 |
| 1880 scoped_refptr<gpu::GpuChannelHost> RenderThreadImpl::EstablishGpuChannelSync() { | 1889 scoped_refptr<gpu::GpuChannelHost> RenderThreadImpl::EstablishGpuChannelSync() { |
| 1881 TRACE_EVENT0("gpu", "RenderThreadImpl::EstablishGpuChannelSync"); | 1890 TRACE_EVENT0("gpu", "RenderThreadImpl::EstablishGpuChannelSync"); |
| 1882 | 1891 |
| 1883 if (gpu_channel_) { | 1892 if (gpu_channel_) { |
| 1884 // Do nothing if we already have a GPU channel or are already | 1893 // Do nothing if we already have a GPU channel or are already |
| 1885 // establishing one. | 1894 // establishing one. |
| 1886 if (!gpu_channel_->IsLost()) | 1895 if (!gpu_channel_->IsLost()) |
| 1887 return gpu_channel_; | 1896 return gpu_channel_; |
| 1888 | 1897 |
| 1889 // Recreate the channel if it has been lost. | 1898 // Recreate the channel if it has been lost. |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2471 } | 2480 } |
| 2472 } | 2481 } |
| 2473 | 2482 |
| 2474 void RenderThreadImpl::OnRendererInterfaceRequest( | 2483 void RenderThreadImpl::OnRendererInterfaceRequest( |
| 2475 mojom::RendererAssociatedRequest request) { | 2484 mojom::RendererAssociatedRequest request) { |
| 2476 DCHECK(!renderer_binding_.is_bound()); | 2485 DCHECK(!renderer_binding_.is_bound()); |
| 2477 renderer_binding_.Bind(std::move(request)); | 2486 renderer_binding_.Bind(std::move(request)); |
| 2478 } | 2487 } |
| 2479 | 2488 |
| 2480 } // namespace content | 2489 } // namespace content |
| OLD | NEW |