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

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

Issue 57463011: Don't send the renderer flags that it doesn't use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | 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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 GpuDataManagerImpl::UnlockedSession session(owner_); 627 GpuDataManagerImpl::UnlockedSession session(owner_);
628 observer_list_->Notify(&GpuDataManagerObserver::OnVideoMemoryUsageStatsUpdate, 628 observer_list_->Notify(&GpuDataManagerObserver::OnVideoMemoryUsageStatsUpdate,
629 video_memory_usage_stats); 629 video_memory_usage_stats);
630 } 630 }
631 631
632 void GpuDataManagerImplPrivate::AppendRendererCommandLine( 632 void GpuDataManagerImplPrivate::AppendRendererCommandLine(
633 CommandLine* command_line) const { 633 CommandLine* command_line) const {
634 DCHECK(command_line); 634 DCHECK(command_line);
635 635
636 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL)) { 636 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL)) {
637 if (!command_line->HasSwitch(switches::kDisableExperimentalWebGL))
638 command_line->AppendSwitch(switches::kDisableExperimentalWebGL);
639 if (!command_line->HasSwitch(switches::kDisablePepper3d)) 637 if (!command_line->HasSwitch(switches::kDisablePepper3d))
640 command_line->AppendSwitch(switches::kDisablePepper3d); 638 command_line->AppendSwitch(switches::kDisablePepper3d);
641 } 639 }
642 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_MULTISAMPLING) &&
643 !command_line->HasSwitch(switches::kDisableGLMultisampling))
644 command_line->AppendSwitch(switches::kDisableGLMultisampling);
645 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) && 640 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) &&
646 !command_line->HasSwitch(switches::kDisableAcceleratedCompositing)) 641 !command_line->HasSwitch(switches::kDisableAcceleratedCompositing))
647 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); 642 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing);
648 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) &&
649 !command_line->HasSwitch(switches::kDisableAccelerated2dCanvas))
650 command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas);
651 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) && 643 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) &&
652 !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) 644 !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode))
653 command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); 645 command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
654 646
655 if (use_software_compositor_ && 647 if (use_software_compositor_ &&
656 !command_line->HasSwitch(switches::kEnableSoftwareCompositing)) 648 !command_line->HasSwitch(switches::kEnableSoftwareCompositing))
657 command_line->AppendSwitch(switches::kEnableSoftwareCompositing); 649 command_line->AppendSwitch(switches::kEnableSoftwareCompositing);
658 650
659 #if defined(USE_AURA) 651 #if defined(USE_AURA)
660 if (!CanUseGpuBrowserCompositor()) { 652 if (!CanUseGpuBrowserCompositor()) {
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 1202
1211 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { 1203 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() {
1212 gpu_process_accessible_ = false; 1204 gpu_process_accessible_ = false;
1213 gpu_info_.finalized = true; 1205 gpu_info_.finalized = true;
1214 complete_gpu_info_already_requested_ = true; 1206 complete_gpu_info_already_requested_ = true;
1215 // Some observers might be waiting. 1207 // Some observers might be waiting.
1216 NotifyGpuInfoUpdate(); 1208 NotifyGpuInfoUpdate();
1217 } 1209 }
1218 1210
1219 } // namespace content 1211 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698