| 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 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 // been initialized by the Zygote before this instance became a Renderer. | 853 // been initialized by the Zygote before this instance became a Renderer. |
| 854 media::InitializeMediaLibrary(); | 854 media::InitializeMediaLibrary(); |
| 855 | 855 |
| 856 #if defined(OS_ANDROID) | 856 #if defined(OS_ANDROID) |
| 857 if (!command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode) && | 857 if (!command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode) && |
| 858 media::MediaCodecUtil::IsMediaCodecAvailable()) { | 858 media::MediaCodecUtil::IsMediaCodecAvailable()) { |
| 859 media::EnablePlatformDecoderSupport(); | 859 media::EnablePlatformDecoderSupport(); |
| 860 } | 860 } |
| 861 #endif | 861 #endif |
| 862 | 862 |
| 863 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableHDR) || | |
| 864 base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 865 switches::kEnableNewVp9CodecString)) { | |
| 866 media::EnableNewVp9CodecStringSupport(); | |
| 867 } | |
| 868 | |
| 869 memory_pressure_listener_.reset(new base::MemoryPressureListener( | 863 memory_pressure_listener_.reset(new base::MemoryPressureListener( |
| 870 base::Bind(&RenderThreadImpl::OnMemoryPressure, base::Unretained(this)), | 864 base::Bind(&RenderThreadImpl::OnMemoryPressure, base::Unretained(this)), |
| 871 base::Bind(&RenderThreadImpl::OnSyncMemoryPressure, | 865 base::Bind(&RenderThreadImpl::OnSyncMemoryPressure, |
| 872 base::Unretained(this)))); | 866 base::Unretained(this)))); |
| 873 | 867 |
| 874 if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) { | 868 if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) { |
| 875 // Disable MemoryPressureListener when memory coordinator is enabled. | 869 // Disable MemoryPressureListener when memory coordinator is enabled. |
| 876 base::MemoryPressureListener::SetNotificationsSuppressed(true); | 870 base::MemoryPressureListener::SetNotificationsSuppressed(true); |
| 877 | 871 |
| 878 // TODO(bashi): Revisit how to manage the lifetime of | 872 // TODO(bashi): Revisit how to manage the lifetime of |
| (...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2497 } | 2491 } |
| 2498 } | 2492 } |
| 2499 | 2493 |
| 2500 void RenderThreadImpl::OnRendererInterfaceRequest( | 2494 void RenderThreadImpl::OnRendererInterfaceRequest( |
| 2501 mojom::RendererAssociatedRequest request) { | 2495 mojom::RendererAssociatedRequest request) { |
| 2502 DCHECK(!renderer_binding_.is_bound()); | 2496 DCHECK(!renderer_binding_.is_bound()); |
| 2503 renderer_binding_.Bind(std::move(request)); | 2497 renderer_binding_.Bind(std::move(request)); |
| 2504 } | 2498 } |
| 2505 | 2499 |
| 2506 } // namespace content | 2500 } // namespace content |
| OLD | NEW |