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/renderer_webkitplatformsupport_impl.h" | 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 if (!host) | 611 if (!host) |
612 return false; | 612 return false; |
613 | 613 |
614 const GPUInfo& gpu_info = host->gpu_info(); | 614 const GPUInfo& gpu_info = host->gpu_info(); |
615 if (gpu_info.can_lose_context || gpu_info.software_rendering) | 615 if (gpu_info.can_lose_context || gpu_info.software_rendering) |
616 return false; | 616 return false; |
617 | 617 |
618 return true; | 618 return true; |
619 } | 619 } |
620 | 620 |
| 621 bool RendererWebKitPlatformSupportImpl::isThreadedCompositingEnabled() { |
| 622 return !!RenderThreadImpl::current()->compositor_thread(); |
| 623 } |
| 624 |
621 double RendererWebKitPlatformSupportImpl::audioHardwareSampleRate() { | 625 double RendererWebKitPlatformSupportImpl::audioHardwareSampleRate() { |
622 RenderThreadImpl* thread = RenderThreadImpl::current(); | 626 RenderThreadImpl* thread = RenderThreadImpl::current(); |
623 return thread->GetAudioHardwareConfig()->GetOutputSampleRate(); | 627 return thread->GetAudioHardwareConfig()->GetOutputSampleRate(); |
624 } | 628 } |
625 | 629 |
626 size_t RendererWebKitPlatformSupportImpl::audioHardwareBufferSize() { | 630 size_t RendererWebKitPlatformSupportImpl::audioHardwareBufferSize() { |
627 RenderThreadImpl* thread = RenderThreadImpl::current(); | 631 RenderThreadImpl* thread = RenderThreadImpl::current(); |
628 return thread->GetAudioHardwareConfig()->GetOutputBufferSize(); | 632 return thread->GetAudioHardwareConfig()->GetOutputBufferSize(); |
629 } | 633 } |
630 | 634 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 //------------------------------------------------------------------------------ | 863 //------------------------------------------------------------------------------ |
860 | 864 |
861 bool RendererWebKitPlatformSupportImpl::processMemorySizesInBytes( | 865 bool RendererWebKitPlatformSupportImpl::processMemorySizesInBytes( |
862 size_t* private_bytes, size_t* shared_bytes) { | 866 size_t* private_bytes, size_t* shared_bytes) { |
863 content::RenderThread::Get()->Send( | 867 content::RenderThread::Get()->Send( |
864 new ViewHostMsg_GetProcessMemorySizes(private_bytes, shared_bytes)); | 868 new ViewHostMsg_GetProcessMemorySizes(private_bytes, shared_bytes)); |
865 return true; | 869 return true; |
866 } | 870 } |
867 | 871 |
868 } // namespace content | 872 } // namespace content |
OLD | NEW |