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

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

Issue 8474007: Disable accelerated 2d canvas and put it back as an option in about:flags. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/912/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 | « chrome/browser/about_flags.cc ('k') | content/browser/gpu/gpu_data_manager.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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 GpuProcessHost::gpu_enabled() && 439 GpuProcessHost::gpu_enabled() &&
440 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); 440 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing);
441 web_prefs.threaded_compositing_enabled = 441 web_prefs.threaded_compositing_enabled =
442 command_line.HasSwitch(switches::kEnableThreadedCompositing); 442 command_line.HasSwitch(switches::kEnableThreadedCompositing);
443 web_prefs.force_compositing_mode = 443 web_prefs.force_compositing_mode =
444 command_line.HasSwitch(switches::kForceCompositingMode); 444 command_line.HasSwitch(switches::kForceCompositingMode);
445 web_prefs.allow_webui_compositing = 445 web_prefs.allow_webui_compositing =
446 command_line.HasSwitch(switches::kAllowWebUICompositing); 446 command_line.HasSwitch(switches::kAllowWebUICompositing);
447 web_prefs.accelerated_2d_canvas_enabled = 447 web_prefs.accelerated_2d_canvas_enabled =
448 GpuProcessHost::gpu_enabled() && 448 GpuProcessHost::gpu_enabled() &&
449 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); 449 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas);
450 web_prefs.accelerated_drawing_enabled = 450 web_prefs.accelerated_drawing_enabled =
451 GpuProcessHost::gpu_enabled() && 451 GpuProcessHost::gpu_enabled() &&
452 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); 452 command_line.HasSwitch(switches::kEnableAcceleratedDrawing);
453 web_prefs.accelerated_layers_enabled = 453 web_prefs.accelerated_layers_enabled =
454 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); 454 !command_line.HasSwitch(switches::kDisableAcceleratedLayers);
455 web_prefs.composite_to_texture_enabled = 455 web_prefs.composite_to_texture_enabled =
456 command_line.HasSwitch(switches::kEnableCompositeToTexture); 456 command_line.HasSwitch(switches::kEnableCompositeToTexture);
457 web_prefs.accelerated_plugins_enabled = 457 web_prefs.accelerated_plugins_enabled =
458 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); 458 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins);
459 web_prefs.accelerated_video_enabled = 459 web_prefs.accelerated_video_enabled =
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 DictionaryValue* inspector_settings = update.Get(); 542 DictionaryValue* inspector_settings = update.Get();
543 inspector_settings->SetWithoutPathExpansion(key, 543 inspector_settings->SetWithoutPathExpansion(key,
544 Value::CreateStringValue(value)); 544 Value::CreateStringValue(value));
545 } 545 }
546 546
547 void RenderViewHostDelegateHelper::ClearInspectorSettings( 547 void RenderViewHostDelegateHelper::ClearInspectorSettings(
548 content::BrowserContext* browser_context) { 548 content::BrowserContext* browser_context) {
549 Profile::FromBrowserContext(browser_context)->GetPrefs()-> 549 Profile::FromBrowserContext(browser_context)->GetPrefs()->
550 ClearPref(prefs::kWebKitInspectorSettings); 550 ClearPref(prefs::kWebKitInspectorSettings);
551 } 551 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/browser/gpu/gpu_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698