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

Side by Side Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 12378094: Implement WebKit::Platform::isThreadedCompositingEnabled() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | webkit/support/test_webkit_platform_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698