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

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: 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
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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); 426 command_line.HasSwitch(switches::kAllowFileAccessFromFiles);
427 web_prefs.show_composited_layer_borders = 427 web_prefs.show_composited_layer_borders =
428 command_line.HasSwitch(switches::kShowCompositedLayerBorders); 428 command_line.HasSwitch(switches::kShowCompositedLayerBorders);
429 web_prefs.show_composited_layer_tree = 429 web_prefs.show_composited_layer_tree =
430 command_line.HasSwitch(switches::kShowCompositedLayerTree); 430 command_line.HasSwitch(switches::kShowCompositedLayerTree);
431 web_prefs.show_fps_counter = 431 web_prefs.show_fps_counter =
432 command_line.HasSwitch(switches::kShowFPSCounter); 432 command_line.HasSwitch(switches::kShowFPSCounter);
433 web_prefs.accelerated_compositing_enabled = 433 web_prefs.accelerated_compositing_enabled =
434 GpuProcessHost::gpu_enabled() && 434 GpuProcessHost::gpu_enabled() &&
435 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); 435 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing);
436 web_prefs.threaded_compositing_enabled =
437 command_line.HasSwitch(switches::kEnableThreadedCompositing);
436 web_prefs.force_compositing_mode = 438 web_prefs.force_compositing_mode =
437 command_line.HasSwitch(switches::kForceCompositingMode); 439 command_line.HasSwitch(switches::kForceCompositingMode);
438 web_prefs.allow_webui_compositing = 440 web_prefs.allow_webui_compositing =
439 command_line.HasSwitch(switches::kAllowWebUICompositing); 441 command_line.HasSwitch(switches::kAllowWebUICompositing);
440 web_prefs.accelerated_2d_canvas_enabled = 442 web_prefs.accelerated_2d_canvas_enabled =
441 GpuProcessHost::gpu_enabled() && 443 GpuProcessHost::gpu_enabled() &&
442 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); 444 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas);
443 web_prefs.accelerated_drawing_enabled = 445 web_prefs.accelerated_drawing_enabled =
444 GpuProcessHost::gpu_enabled() && 446 GpuProcessHost::gpu_enabled() &&
445 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); 447 command_line.HasSwitch(switches::kEnableAcceleratedDrawing);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 DictionaryValue* inspector_settings = update.Get(); 537 DictionaryValue* inspector_settings = update.Get();
536 inspector_settings->SetWithoutPathExpansion(key, 538 inspector_settings->SetWithoutPathExpansion(key,
537 Value::CreateStringValue(value)); 539 Value::CreateStringValue(value));
538 } 540 }
539 541
540 void RenderViewHostDelegateHelper::ClearInspectorSettings( 542 void RenderViewHostDelegateHelper::ClearInspectorSettings(
541 content::BrowserContext* browser_context) { 543 content::BrowserContext* browser_context) {
542 Profile::FromBrowserContext(browser_context)->GetPrefs()-> 544 Profile::FromBrowserContext(browser_context)->GetPrefs()->
543 ClearPref(prefs::kWebKitInspectorSettings); 545 ClearPref(prefs::kWebKitInspectorSettings);
544 } 546 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698