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

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 546593002: Make --disable-gpu-compositing disable browser compositor as well. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/browser/gpu/gpu_data_manager_impl_private.h" 5 #include "content/browser/gpu/gpu_data_manager_impl_private.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 gpu_info_.secondary_gpus[ii].active = false; 815 gpu_info_.secondary_gpus[ii].active = false;
816 } 816 }
817 } 817 }
818 gpu_info_.gpu.active = false; 818 gpu_info_.gpu.active = false;
819 } 819 }
820 UpdateGpuInfoHelper(); 820 UpdateGpuInfoHelper();
821 return true; 821 return true;
822 } 822 }
823 823
824 bool GpuDataManagerImplPrivate::CanUseGpuBrowserCompositor() const { 824 bool GpuDataManagerImplPrivate::CanUseGpuBrowserCompositor() const {
825 if (CommandLine::ForCurrentProcess()->HasSwitch(
826 switches::kDisableGpuCompositing))
827 return false;
825 if (ShouldUseWarp()) 828 if (ShouldUseWarp())
826 return true; 829 return true;
827 if (ShouldUseSwiftShader()) 830 if (ShouldUseSwiftShader())
828 return false; 831 return false;
829 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING)) 832 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING))
830 return false; 833 return false;
831 return true; 834 return true;
832 } 835 }
833 836
834 void GpuDataManagerImplPrivate::BlockDomainFrom3DAPIs( 837 void GpuDataManagerImplPrivate::BlockDomainFrom3DAPIs(
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 1108
1106 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { 1109 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() {
1107 gpu_process_accessible_ = false; 1110 gpu_process_accessible_ = false;
1108 gpu_info_.finalized = true; 1111 gpu_info_.finalized = true;
1109 complete_gpu_info_already_requested_ = true; 1112 complete_gpu_info_already_requested_ = true;
1110 // Some observers might be waiting. 1113 // Some observers might be waiting.
1111 NotifyGpuInfoUpdate(); 1114 NotifyGpuInfoUpdate();
1112 } 1115 }
1113 1116
1114 } // namespace content 1117 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698