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

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: Created 9 years, 10 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 accelerated_compositing_enabled(false), 69 accelerated_compositing_enabled(false),
68 accelerated_layers_enabled(false), 70 accelerated_layers_enabled(false),
69 accelerated_video_enabled(false), 71 accelerated_video_enabled(false),
70 accelerated_2d_canvas_enabled(false), 72 accelerated_2d_canvas_enabled(false),
71 accelerated_plugins_enabled(false), 73 accelerated_plugins_enabled(false),
72 memory_info_enabled(false), 74 memory_info_enabled(false),
73 interactive_form_validation_enabled(true) { 75 interactive_form_validation_enabled(true) {
74 } 76 }
75 77
76 WebPreferences::~WebPreferences() { 78 WebPreferences::~WebPreferences() {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 WebRuntimeFeatures::isWebGLEnabled() && experimental_webgl_enabled; 155 WebRuntimeFeatures::isWebGLEnabled() && experimental_webgl_enabled;
154 settings->setExperimentalWebGLEnabled(enable_webgl); 156 settings->setExperimentalWebGLEnabled(enable_webgl);
155 157
156 // Disable GL multisampling if requested on command line. 158 // Disable GL multisampling if requested on command line.
157 settings->setOpenGLMultisamplingEnabled(gl_multisampling_enabled); 159 settings->setOpenGLMultisamplingEnabled(gl_multisampling_enabled);
158 160
159 // Display colored borders around composited render layers if requested 161 // Display colored borders around composited render layers if requested
160 // on command line. 162 // on command line.
161 settings->setShowDebugBorders(show_composited_layer_borders); 163 settings->setShowDebugBorders(show_composited_layer_borders);
162 164
165 // Display an FPS indicator if requested on the command line.
166 settings->setShowFPSCounter(show_fps_counter);
167
168 // Display the current compositor tree as overlay if requested on
169 // the command line
170 settings->setShowPlatformLayerTree(show_composited_layer_tree);
171
163 // Enable gpu-accelerated compositing if requested on the command line. 172 // Enable gpu-accelerated compositing if requested on the command line.
164 settings->setAcceleratedCompositingEnabled(accelerated_compositing_enabled); 173 settings->setAcceleratedCompositingEnabled(accelerated_compositing_enabled);
165 174
166 // Enable gpu-accelerated 2d canvas if requested on the command line. 175 // Enable gpu-accelerated 2d canvas if requested on the command line.
167 settings->setAccelerated2dCanvasEnabled(accelerated_2d_canvas_enabled); 176 settings->setAccelerated2dCanvasEnabled(accelerated_2d_canvas_enabled);
168 177
169 // Enabling accelerated layers from the command line enabled accelerated 178 // Enabling accelerated layers from the command line enabled accelerated
170 // 3D CSS, Video, and Animations. 179 // 3D CSS, Video, and Animations.
171 settings->setAcceleratedCompositingFor3DTransformsEnabled( 180 settings->setAcceleratedCompositingFor3DTransformsEnabled(
172 accelerated_layers_enabled); 181 accelerated_layers_enabled);
(...skipping 18 matching lines...) Expand all
191 web_view->setInspectorSetting(WebString::fromUTF8(it->first), 200 web_view->setInspectorSetting(WebString::fromUTF8(it->first),
192 WebString::fromUTF8(it->second)); 201 WebString::fromUTF8(it->second));
193 202
194 // Tabs to link is not part of the settings. WebCore calls 203 // Tabs to link is not part of the settings. WebCore calls
195 // ChromeClient::tabsToLinks which is part of the glue code. 204 // ChromeClient::tabsToLinks which is part of the glue code.
196 web_view->setTabsToLinks(tabs_to_links); 205 web_view->setTabsToLinks(tabs_to_links);
197 206
198 settings->setInteractiveFormValidationEnabled( 207 settings->setInteractiveFormValidationEnabled(
199 interactive_form_validation_enabled); 208 interactive_form_validation_enabled);
200 } 209 }
OLDNEW
« chrome/common/render_messages.cc ('K') | « webkit/glue/webpreferences.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698