OLD | NEW |
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/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 GpuProcessHost::gpu_enabled() && | 507 GpuProcessHost::gpu_enabled() && |
508 command_line.HasSwitch(switches::kEnableAcceleratedPainting); | 508 command_line.HasSwitch(switches::kEnableAcceleratedPainting); |
509 prefs.accelerated_filters_enabled = | 509 prefs.accelerated_filters_enabled = |
510 GpuProcessHost::gpu_enabled() && | 510 GpuProcessHost::gpu_enabled() && |
511 command_line.HasSwitch(switches::kEnableAcceleratedFilters); | 511 command_line.HasSwitch(switches::kEnableAcceleratedFilters); |
512 prefs.accelerated_layers_enabled = | 512 prefs.accelerated_layers_enabled = |
513 prefs.accelerated_animation_enabled = | 513 prefs.accelerated_animation_enabled = |
514 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); | 514 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); |
515 prefs.accelerated_plugins_enabled = | 515 prefs.accelerated_plugins_enabled = |
516 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); | 516 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); |
517 // Temporarily disabling H/W accelerated video on windows to see if it is the | |
518 // cause of the spike in the gpu process crashes. | |
519 #if defined(OS_WIN) | |
520 prefs.accelerated_video_enabled = false; | |
521 #else // OS_WIN | |
522 prefs.accelerated_video_enabled = | 517 prefs.accelerated_video_enabled = |
523 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); | 518 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); |
524 #endif // OS_WIN | |
525 prefs.fullscreen_enabled = | 519 prefs.fullscreen_enabled = |
526 !command_line.HasSwitch(switches::kDisableFullScreen); | 520 !command_line.HasSwitch(switches::kDisableFullScreen); |
527 prefs.css_regions_enabled = | 521 prefs.css_regions_enabled = |
528 command_line.HasSwitch(switches::kEnableCssRegions); | 522 command_line.HasSwitch(switches::kEnableCssRegions); |
529 prefs.css_shaders_enabled = | 523 prefs.css_shaders_enabled = |
530 command_line.HasSwitch(switches::kEnableCssShaders); | 524 command_line.HasSwitch(switches::kEnableCssShaders); |
531 prefs.css_variables_enabled = | 525 prefs.css_variables_enabled = |
532 command_line.HasSwitch(switches::kEnableCssVariables); | 526 command_line.HasSwitch(switches::kEnableCssVariables); |
533 prefs.device_supports_touch = | 527 prefs.device_supports_touch = |
534 ui::GetDisplayLayout() == ui::LAYOUT_TOUCH; | 528 ui::GetDisplayLayout() == ui::LAYOUT_TOUCH; |
(...skipping 2606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3141 old_browser_plugin_host()->embedder_render_process_host(); | 3135 old_browser_plugin_host()->embedder_render_process_host(); |
3142 *embedder_container_id = old_browser_plugin_host()->instance_id(); | 3136 *embedder_container_id = old_browser_plugin_host()->instance_id(); |
3143 int embedder_process_id = | 3137 int embedder_process_id = |
3144 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3138 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
3145 if (embedder_process_id != -1) { | 3139 if (embedder_process_id != -1) { |
3146 *embedder_channel_name = | 3140 *embedder_channel_name = |
3147 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3141 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
3148 embedder_process_id); | 3142 embedder_process_id); |
3149 } | 3143 } |
3150 } | 3144 } |
OLD | NEW |