diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-15 03:20:49 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-15 03:20:49 +0000 |
commit | 76ccd25fb6664c237b464b779d0a5b0c01ed0499 (patch) | |
tree | 91cd25b39ed3075374da027349aa108f659c1a4d /content | |
parent | fae76fba25c599d3cc392b4098bd5cf73eef24fe (diff) | |
download | chromium_src-76ccd25fb6664c237b464b779d0a5b0c01ed0499.zip chromium_src-76ccd25fb6664c237b464b779d0a5b0c01ed0499.tar.gz chromium_src-76ccd25fb6664c237b464b779d0a5b0c01ed0499.tar.bz2 |
Revert 173259, broke win7 tests:
http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/13892/steps/content_unittests/logs/GpuSideBlacklisting
GpuDataManagerImplTest.GpuSideBlacklisting:
browser\gpu\gpu_data_manager_impl_unittest.cc(147): error: Value of: manager->GpuAccessAllowed()
Actual: true
Expected: false
browser\gpu\gpu_data_manager_impl_unittest.cc(150): error: Value of: manager->GetBlacklistedFeatures()
Actual: 4
Expected: GPU_FEATURE_TYPE_WEBGL | GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS
Which is: 5
> Fix a bug in r173248
>
> Otherwise it will fail GPU blacklisting.
>
> BUG=162928,165374
> TEST=manual about:gpu on machines with blacklisted features
> TBR=kbr
> Review URL: https://codereview.chromium.org/11577033
TBR=zmo@google.com
Review URL: https://codereview.chromium.org/11576051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173266 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/gpu/gpu_data_manager_impl.cc | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc index 1388572..27590e7 100644 --- a/content/browser/gpu/gpu_data_manager_impl.cc +++ b/content/browser/gpu/gpu_data_manager_impl.cc @@ -173,10 +173,6 @@ void GpuDataManagerImpl::InitializeImpl( CHECK(succeed); } - { - base::AutoLock auto_lock(gpu_info_lock_); - gpu_info_ = gpu_info; - } UpdateGpuInfo(gpu_info); UpdateGpuSwitchingManager(gpu_info); UpdatePreliminaryBlacklistedFeatures(); @@ -212,21 +208,12 @@ void GpuDataManagerImpl::UpdateGpuInfo(const GPUInfo& gpu_info) { if (software_rendering_) return; - GPUInfo my_gpu_info; - { - base::AutoLock auto_lock(gpu_info_lock_); - gpu_info_collector::MergeGPUInfo(&gpu_info_, gpu_info); - complete_gpu_info_already_requested_ = - complete_gpu_info_already_requested_ || gpu_info_.finalized; - my_gpu_info = gpu_info_; - } - - GetContentClient()->SetGpuInfo(my_gpu_info); + GetContentClient()->SetGpuInfo(gpu_info); if (gpu_blacklist_.get()) { GpuBlacklist::Decision decision = gpu_blacklist_->MakeBlacklistDecision( - GpuBlacklist::kOsAny, "", my_gpu_info); + GpuBlacklist::kOsAny, "", gpu_info); if (update_histograms_) UpdateStats(gpu_blacklist_.get(), decision.blacklisted_features); @@ -239,6 +226,13 @@ void GpuDataManagerImpl::UpdateGpuInfo(const GPUInfo& gpu_info) { } } + { + base::AutoLock auto_lock(gpu_info_lock_); + gpu_info_collector::MergeGPUInfo(&gpu_info_, gpu_info); + complete_gpu_info_already_requested_ = + complete_gpu_info_already_requested_ || gpu_info_.finalized; + } + // We have to update GpuFeatureType before notify all the observers. NotifyGpuInfoUpdate(); } |