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

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

Issue 8404026: Add a command line flag (--enable-fixed-position-compositing) for enabling compositing (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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/common/view_messages.h » ('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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = 444 web_prefs.threaded_compositing_enabled =
445 command_line.HasSwitch(switches::kEnableThreadedCompositing); 445 command_line.HasSwitch(switches::kEnableThreadedCompositing);
446 web_prefs.force_compositing_mode = 446 web_prefs.force_compositing_mode =
447 command_line.HasSwitch(switches::kForceCompositingMode); 447 command_line.HasSwitch(switches::kForceCompositingMode);
448 web_prefs.fixed_position_compositing_enabled =
449 command_line.HasSwitch(switches::kEnableCompositingForFixedPosition);
448 web_prefs.allow_webui_compositing = 450 web_prefs.allow_webui_compositing =
449 command_line.HasSwitch(switches::kAllowWebUICompositing); 451 command_line.HasSwitch(switches::kAllowWebUICompositing);
450 web_prefs.accelerated_2d_canvas_enabled = 452 web_prefs.accelerated_2d_canvas_enabled =
451 GpuProcessHost::gpu_enabled() && 453 GpuProcessHost::gpu_enabled() &&
452 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); 454 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas);
453 web_prefs.accelerated_drawing_enabled = 455 web_prefs.accelerated_drawing_enabled =
454 GpuProcessHost::gpu_enabled() && 456 GpuProcessHost::gpu_enabled() &&
455 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); 457 command_line.HasSwitch(switches::kEnableAcceleratedDrawing);
456 web_prefs.accelerated_layers_enabled = 458 web_prefs.accelerated_layers_enabled =
457 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); 459 !command_line.HasSwitch(switches::kDisableAcceleratedLayers);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 DictionaryValue* inspector_settings = update.Get(); 547 DictionaryValue* inspector_settings = update.Get();
546 inspector_settings->SetWithoutPathExpansion(key, 548 inspector_settings->SetWithoutPathExpansion(key,
547 Value::CreateStringValue(value)); 549 Value::CreateStringValue(value));
548 } 550 }
549 551
550 void RenderViewHostDelegateHelper::ClearInspectorSettings( 552 void RenderViewHostDelegateHelper::ClearInspectorSettings(
551 content::BrowserContext* browser_context) { 553 content::BrowserContext* browser_context) {
552 Profile::FromBrowserContext(browser_context)->GetPrefs()-> 554 Profile::FromBrowserContext(browser_context)->GetPrefs()->
553 ClearPref(prefs::kWebKitInspectorSettings); 555 ClearPref(prefs::kWebKitInspectorSettings);
554 } 556 }
OLDNEW
« no previous file with comments | « no previous file | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698