OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/public/renderer/web_preferences.h" | 5 #include "content/public/renderer/web_preferences.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "third_party/WebKit/public/platform/WebString.h" | 8 #include "third_party/WebKit/public/platform/WebString.h" |
9 #include "third_party/WebKit/public/platform/WebURL.h" | 9 #include "third_party/WebKit/public/platform/WebURL.h" |
10 #include "third_party/WebKit/public/web/WebKit.h" | 10 #include "third_party/WebKit/public/web/WebKit.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 // Enable gpu-accelerated 2d canvas if requested on the command line. | 230 // Enable gpu-accelerated 2d canvas if requested on the command line. |
231 settings->setAccelerated2dCanvasEnabled(prefs.accelerated_2d_canvas_enabled); | 231 settings->setAccelerated2dCanvasEnabled(prefs.accelerated_2d_canvas_enabled); |
232 | 232 |
233 settings->setMinimumAccelerated2dCanvasSize( | 233 settings->setMinimumAccelerated2dCanvasSize( |
234 prefs.minimum_accelerated_2d_canvas_size); | 234 prefs.minimum_accelerated_2d_canvas_size); |
235 | 235 |
236 // Disable antialiasing for 2d canvas if requested on the command line. | 236 // Disable antialiasing for 2d canvas if requested on the command line. |
237 settings->setAntialiased2dCanvasEnabled( | 237 settings->setAntialiased2dCanvasEnabled( |
238 !prefs.antialiased_2d_canvas_disabled); | 238 !prefs.antialiased_2d_canvas_disabled); |
239 | 239 |
| 240 // Set MSAA sample count for 2d canvas if requested on the command line (or |
| 241 // default value if not). |
| 242 settings->setAccelerated2dCanvasMSAASampleCount( |
| 243 prefs.accelerated_2d_canvas_msaa_sample_count); |
| 244 |
240 // Enable gpu-accelerated filters if requested on the command line. | 245 // Enable gpu-accelerated filters if requested on the command line. |
241 settings->setAcceleratedFiltersEnabled(prefs.accelerated_filters_enabled); | 246 settings->setAcceleratedFiltersEnabled(prefs.accelerated_filters_enabled); |
242 | 247 |
243 // Enable gesture tap highlight if requested on the command line. | 248 // Enable gesture tap highlight if requested on the command line. |
244 settings->setGestureTapHighlightEnabled(prefs.gesture_tap_highlight_enabled); | 249 settings->setGestureTapHighlightEnabled(prefs.gesture_tap_highlight_enabled); |
245 | 250 |
246 // Enabling accelerated layers from the command line enabled accelerated | 251 // Enabling accelerated layers from the command line enabled accelerated |
247 // 3D CSS, Video, and Animations. | 252 // 3D CSS, Video, and Animations. |
248 settings->setAcceleratedCompositingFor3DTransformsEnabled( | 253 settings->setAcceleratedCompositingFor3DTransformsEnabled( |
249 prefs.accelerated_compositing_for_3d_transforms_enabled); | 254 prefs.accelerated_compositing_for_3d_transforms_enabled); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 settings->setPinchVirtualViewportEnabled( | 366 settings->setPinchVirtualViewportEnabled( |
362 prefs.pinch_virtual_viewport_enabled); | 367 prefs.pinch_virtual_viewport_enabled); |
363 | 368 |
364 settings->setPinchOverlayScrollbarThickness( | 369 settings->setPinchOverlayScrollbarThickness( |
365 prefs.pinch_overlay_scrollbar_thickness); | 370 prefs.pinch_overlay_scrollbar_thickness); |
366 settings->setUseSolidColorScrollbars(prefs.use_solid_color_scrollbars); | 371 settings->setUseSolidColorScrollbars(prefs.use_solid_color_scrollbars); |
367 settings->setCompositorTouchHitTesting(prefs.compositor_touch_hit_testing); | 372 settings->setCompositorTouchHitTesting(prefs.compositor_touch_hit_testing); |
368 } | 373 } |
369 | 374 |
370 } // namespace content | 375 } // namespace content |
OLD | NEW |