diff options
author | dongseong.hwang@intel.com <dongseong.hwang@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-03 11:20:27 +0000 |
---|---|---|
committer | dongseong.hwang@intel.com <dongseong.hwang@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-03 11:20:27 +0000 |
commit | 9f05f012951b73116c0cd50191b0d63871437a95 (patch) | |
tree | 3c7e0a7bc989b7b19872e0d42dee10bc720f67ff /content/browser/gpu/compositor_util.cc | |
parent | 9dcf724687237e1b8c94a103f65691287b058378 (diff) | |
download | chromium_src-9f05f012951b73116c0cd50191b0d63871437a95.zip chromium_src-9f05f012951b73116c0cd50191b0d63871437a95.tar.gz chromium_src-9f05f012951b73116c0cd50191b0d63871437a95.tar.bz2 |
Make consistent with Accelerated 2D Canvas flag on both implementation and chrome://gpu.
Currently, we don't enable accelerated 2d canvas in software rendering mode, but
chrome://gpu does not concern software rendering mode.
This CL adds GPUInfo::SupportsAccelerated2dCanvas() so that any clients query if
accelerated 2d canvas is supported.
Review URL: https://codereview.chromium.org/95013004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238347 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/gpu/compositor_util.cc')
-rw-r--r-- | content/browser/gpu/compositor_util.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc index 916fcde..81436e2 100644 --- a/content/browser/gpu/compositor_util.cc +++ b/content/browser/gpu/compositor_util.cc @@ -24,14 +24,6 @@ struct GpuFeatureInfo { bool fallback_to_software; }; -// Determine if accelerated-2d-canvas is supported, which depends on whether -// lose_context could happen. -bool SupportsAccelerated2dCanvas() { - if (GpuDataManagerImpl::GetInstance()->GetGPUInfo().can_lose_context) - return false; - return true; -} - #if defined(OS_CHROMEOS) const size_t kNumFeatures = 14; #else @@ -47,7 +39,8 @@ const GpuFeatureInfo GetGpuFeatureInfo(size_t index) { manager->IsFeatureBlacklisted( gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS), command_line.HasSwitch(switches::kDisableAccelerated2dCanvas) || - !SupportsAccelerated2dCanvas(), + !GpuDataManagerImpl::GetInstance()-> + GetGPUInfo().SupportsAccelerated2dCanvas(), "Accelerated 2D canvas is unavailable: either disabled at the command" " line or not supported by the current system.", true |