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

Side by Side Diff: webkit/glue/webpreferences.cc

Issue 6581004: Add command line switches and about:flag to enable FPS indicator and compositor layer tree. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes based on feedback Created 9 years, 9 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "webkit/glue/webpreferences.h" 5 #include "webkit/glue/webpreferences.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 hyperlink_auditing_enabled(true), 57 hyperlink_auditing_enabled(true),
58 user_style_sheet_enabled(false), 58 user_style_sheet_enabled(false),
59 author_and_user_styles_enabled(true), 59 author_and_user_styles_enabled(true),
60 frame_flattening_enabled(false), 60 frame_flattening_enabled(false),
61 allow_universal_access_from_file_urls(false), 61 allow_universal_access_from_file_urls(false),
62 allow_file_access_from_file_urls(false), 62 allow_file_access_from_file_urls(false),
63 webaudio_enabled(false), 63 webaudio_enabled(false),
64 experimental_webgl_enabled(false), 64 experimental_webgl_enabled(false),
65 gl_multisampling_enabled(true), 65 gl_multisampling_enabled(true),
66 show_composited_layer_borders(false), 66 show_composited_layer_borders(false),
67 show_composited_layer_tree(false),
68 show_fps_counter(false),
67 asynchronous_spell_checking_enabled(true), 69 asynchronous_spell_checking_enabled(true),
68 accelerated_compositing_enabled(false), 70 accelerated_compositing_enabled(false),
69 composite_to_texture_enabled(false), 71 composite_to_texture_enabled(false),
70 accelerated_layers_enabled(false), 72 accelerated_layers_enabled(false),
71 accelerated_video_enabled(false), 73 accelerated_video_enabled(false),
72 accelerated_2d_canvas_enabled(false), 74 accelerated_2d_canvas_enabled(false),
73 accelerated_plugins_enabled(false), 75 accelerated_plugins_enabled(false),
74 memory_info_enabled(false), 76 memory_info_enabled(false),
75 interactive_form_validation_enabled(true) { 77 interactive_form_validation_enabled(true) {
76 } 78 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 WebRuntimeFeatures::isWebGLEnabled() && experimental_webgl_enabled; 157 WebRuntimeFeatures::isWebGLEnabled() && experimental_webgl_enabled;
156 settings->setExperimentalWebGLEnabled(enable_webgl); 158 settings->setExperimentalWebGLEnabled(enable_webgl);
157 159
158 // Disable GL multisampling if requested on command line. 160 // Disable GL multisampling if requested on command line.
159 settings->setOpenGLMultisamplingEnabled(gl_multisampling_enabled); 161 settings->setOpenGLMultisamplingEnabled(gl_multisampling_enabled);
160 162
161 // Display colored borders around composited render layers if requested 163 // Display colored borders around composited render layers if requested
162 // on command line. 164 // on command line.
163 settings->setShowDebugBorders(show_composited_layer_borders); 165 settings->setShowDebugBorders(show_composited_layer_borders);
164 166
167 // Display an FPS indicator if requested on the command line.
168 settings->setShowFPSCounter(show_fps_counter);
169
170 // Display the current compositor tree as overlay if requested on
171 // the command line
172 settings->setShowPlatformLayerTree(show_composited_layer_tree);
173
165 // Enable gpu-accelerated compositing if requested on the command line. 174 // Enable gpu-accelerated compositing if requested on the command line.
166 settings->setAcceleratedCompositingEnabled(accelerated_compositing_enabled); 175 settings->setAcceleratedCompositingEnabled(accelerated_compositing_enabled);
167 176
168 // Enable composite to offscreen texture if requested on the command line. 177 // Enable composite to offscreen texture if requested on the command line.
169 settings->setCompositeToTextureEnabled(composite_to_texture_enabled); 178 settings->setCompositeToTextureEnabled(composite_to_texture_enabled);
170 179
171 // Enable gpu-accelerated 2d canvas if requested on the command line. 180 // Enable gpu-accelerated 2d canvas if requested on the command line.
172 settings->setAccelerated2dCanvasEnabled(accelerated_2d_canvas_enabled); 181 settings->setAccelerated2dCanvasEnabled(accelerated_2d_canvas_enabled);
173 182
174 // Enabling accelerated layers from the command line enabled accelerated 183 // Enabling accelerated layers from the command line enabled accelerated
(...skipping 24 matching lines...) Expand all
199 web_view->setInspectorSetting(WebString::fromUTF8(it->first), 208 web_view->setInspectorSetting(WebString::fromUTF8(it->first),
200 WebString::fromUTF8(it->second)); 209 WebString::fromUTF8(it->second));
201 210
202 // Tabs to link is not part of the settings. WebCore calls 211 // Tabs to link is not part of the settings. WebCore calls
203 // ChromeClient::tabsToLinks which is part of the glue code. 212 // ChromeClient::tabsToLinks which is part of the glue code.
204 web_view->setTabsToLinks(tabs_to_links); 213 web_view->setTabsToLinks(tabs_to_links);
205 214
206 settings->setInteractiveFormValidationEnabled( 215 settings->setInteractiveFormValidationEnabled(
207 interactive_form_validation_enabled); 216 interactive_form_validation_enabled);
208 } 217 }
OLDNEW
« chrome/app/generated_resources.grd ('K') | « webkit/glue/webpreferences.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698