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

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

Issue 7064032: Turns on the gpu accelerated canvas by default (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/ui/browser_init.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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 command_line.HasSwitch(switches::kShowCompositedLayerTree); 313 command_line.HasSwitch(switches::kShowCompositedLayerTree);
314 web_prefs.show_fps_counter = 314 web_prefs.show_fps_counter =
315 command_line.HasSwitch(switches::kShowFPSCounter); 315 command_line.HasSwitch(switches::kShowFPSCounter);
316 web_prefs.accelerated_compositing_enabled = 316 web_prefs.accelerated_compositing_enabled =
317 gpu_enabled() && 317 gpu_enabled() &&
318 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); 318 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing);
319 web_prefs.force_compositing_mode = 319 web_prefs.force_compositing_mode =
320 command_line.HasSwitch(switches::kForceCompositingMode); 320 command_line.HasSwitch(switches::kForceCompositingMode);
321 web_prefs.accelerated_2d_canvas_enabled = 321 web_prefs.accelerated_2d_canvas_enabled =
322 gpu_enabled() && 322 gpu_enabled() &&
323 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas); 323 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas);
324 web_prefs.accelerated_drawing_enabled = 324 web_prefs.accelerated_drawing_enabled =
325 gpu_enabled() && 325 gpu_enabled() &&
326 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); 326 command_line.HasSwitch(switches::kEnableAcceleratedDrawing);
327 web_prefs.accelerated_layers_enabled = 327 web_prefs.accelerated_layers_enabled =
328 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); 328 !command_line.HasSwitch(switches::kDisableAcceleratedLayers);
329 web_prefs.composite_to_texture_enabled = 329 web_prefs.composite_to_texture_enabled =
330 command_line.HasSwitch(switches::kEnableCompositeToTexture); 330 command_line.HasSwitch(switches::kEnableCompositeToTexture);
331 web_prefs.accelerated_plugins_enabled = 331 web_prefs.accelerated_plugins_enabled =
332 command_line.HasSwitch(switches::kEnableAcceleratedPlugins); 332 command_line.HasSwitch(switches::kEnableAcceleratedPlugins);
333 web_prefs.accelerated_video_enabled = 333 web_prefs.accelerated_video_enabled =
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 DictionaryPrefUpdate update(profile->GetPrefs(), 395 DictionaryPrefUpdate update(profile->GetPrefs(),
396 prefs::kWebKitInspectorSettings); 396 prefs::kWebKitInspectorSettings);
397 DictionaryValue* inspector_settings = update.Get(); 397 DictionaryValue* inspector_settings = update.Get();
398 inspector_settings->SetWithoutPathExpansion(key, 398 inspector_settings->SetWithoutPathExpansion(key,
399 Value::CreateStringValue(value)); 399 Value::CreateStringValue(value));
400 } 400 }
401 401
402 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { 402 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) {
403 profile->GetPrefs()->ClearPref(prefs::kWebKitInspectorSettings); 403 profile->GetPrefs()->ClearPref(prefs::kWebKitInspectorSettings);
404 } 404 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698