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

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

Issue 95013004: Make consistent with Accelerated 2D Canvas flag on both implementation and chrome://gpu. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years 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
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/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 sync_message_filter_.get()); 608 sync_message_filter_.get());
609 } 609 }
610 610
611 bool RendererWebKitPlatformSupportImpl::canAccelerate2dCanvas() { 611 bool RendererWebKitPlatformSupportImpl::canAccelerate2dCanvas() {
612 RenderThreadImpl* thread = RenderThreadImpl::current(); 612 RenderThreadImpl* thread = RenderThreadImpl::current();
613 GpuChannelHost* host = thread->EstablishGpuChannelSync( 613 GpuChannelHost* host = thread->EstablishGpuChannelSync(
614 CAUSE_FOR_GPU_LAUNCH_CANVAS_2D); 614 CAUSE_FOR_GPU_LAUNCH_CANVAS_2D);
615 if (!host) 615 if (!host)
616 return false; 616 return false;
617 617
618 const gpu::GPUInfo& gpu_info = host->gpu_info(); 618 return host->gpu_info().SupportsAccelerated2dCanvas();
619 if (gpu_info.can_lose_context || gpu_info.software_rendering)
620 return false;
621
622 return true;
623 } 619 }
624 620
625 bool RendererWebKitPlatformSupportImpl::isThreadedCompositingEnabled() { 621 bool RendererWebKitPlatformSupportImpl::isThreadedCompositingEnabled() {
626 return !!RenderThreadImpl::current()->compositor_message_loop_proxy().get(); 622 return !!RenderThreadImpl::current()->compositor_message_loop_proxy().get();
627 } 623 }
628 624
629 double RendererWebKitPlatformSupportImpl::audioHardwareSampleRate() { 625 double RendererWebKitPlatformSupportImpl::audioHardwareSampleRate() {
630 RenderThreadImpl* thread = RenderThreadImpl::current(); 626 RenderThreadImpl* thread = RenderThreadImpl::current();
631 return thread->GetAudioHardwareConfig()->GetOutputSampleRate(); 627 return thread->GetAudioHardwareConfig()->GetOutputSampleRate();
632 } 628 }
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 return; 1064 return;
1069 QuotaDispatcher::ThreadSpecificInstance( 1065 QuotaDispatcher::ThreadSpecificInstance(
1070 thread_safe_sender_.get(), 1066 thread_safe_sender_.get(),
1071 quota_message_filter_.get())->QueryStorageUsageAndQuota( 1067 quota_message_filter_.get())->QueryStorageUsageAndQuota(
1072 storage_partition, 1068 storage_partition,
1073 static_cast<quota::StorageType>(type), 1069 static_cast<quota::StorageType>(type),
1074 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 1070 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
1075 } 1071 }
1076 1072
1077 } // namespace content 1073 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698