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

Side by Side Diff: chrome/browser/tab_contents/render_view_host_delegate_helper.cc

Issue 8163008: Add command line switch for enabling threaded compositing (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Upload patch against correct base Created 9 years, 2 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 | « no previous file | content/browser/renderer_host/browser_render_process_host.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/tab_contents/render_view_host_delegate_helper.h" 5 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); 434 command_line.HasSwitch(switches::kAllowFileAccessFromFiles);
435 web_prefs.show_composited_layer_borders = 435 web_prefs.show_composited_layer_borders =
436 command_line.HasSwitch(switches::kShowCompositedLayerBorders); 436 command_line.HasSwitch(switches::kShowCompositedLayerBorders);
437 web_prefs.show_composited_layer_tree = 437 web_prefs.show_composited_layer_tree =
438 command_line.HasSwitch(switches::kShowCompositedLayerTree); 438 command_line.HasSwitch(switches::kShowCompositedLayerTree);
439 web_prefs.show_fps_counter = 439 web_prefs.show_fps_counter =
440 command_line.HasSwitch(switches::kShowFPSCounter); 440 command_line.HasSwitch(switches::kShowFPSCounter);
441 web_prefs.accelerated_compositing_enabled = 441 web_prefs.accelerated_compositing_enabled =
442 GpuProcessHost::gpu_enabled() && 442 GpuProcessHost::gpu_enabled() &&
443 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); 443 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing);
444 web_prefs.threaded_compositing_enabled =
445 command_line.HasSwitch(switches::kEnableThreadedCompositing);
444 web_prefs.force_compositing_mode = 446 web_prefs.force_compositing_mode =
445 command_line.HasSwitch(switches::kForceCompositingMode); 447 command_line.HasSwitch(switches::kForceCompositingMode);
446 web_prefs.allow_webui_compositing = 448 web_prefs.allow_webui_compositing =
447 command_line.HasSwitch(switches::kAllowWebUICompositing); 449 command_line.HasSwitch(switches::kAllowWebUICompositing);
448 web_prefs.accelerated_2d_canvas_enabled = 450 web_prefs.accelerated_2d_canvas_enabled =
449 GpuProcessHost::gpu_enabled() && 451 GpuProcessHost::gpu_enabled() &&
450 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); 452 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas);
451 web_prefs.accelerated_drawing_enabled = 453 web_prefs.accelerated_drawing_enabled =
452 GpuProcessHost::gpu_enabled() && 454 GpuProcessHost::gpu_enabled() &&
453 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); 455 command_line.HasSwitch(switches::kEnableAcceleratedDrawing);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 DictionaryValue* inspector_settings = update.Get(); 545 DictionaryValue* inspector_settings = update.Get();
544 inspector_settings->SetWithoutPathExpansion(key, 546 inspector_settings->SetWithoutPathExpansion(key,
545 Value::CreateStringValue(value)); 547 Value::CreateStringValue(value));
546 } 548 }
547 549
548 void RenderViewHostDelegateHelper::ClearInspectorSettings( 550 void RenderViewHostDelegateHelper::ClearInspectorSettings(
549 content::BrowserContext* browser_context) { 551 content::BrowserContext* browser_context) {
550 Profile::FromBrowserContext(browser_context)->GetPrefs()-> 552 Profile::FromBrowserContext(browser_context)->GetPrefs()->
551 ClearPref(prefs::kWebKitInspectorSettings); 553 ClearPref(prefs::kWebKitInspectorSettings);
552 } 554 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698