| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 command_line.HasSwitch(switches::kShowPaintRects); | 480 command_line.HasSwitch(switches::kShowPaintRects); |
| 481 prefs.accelerated_compositing_enabled = | 481 prefs.accelerated_compositing_enabled = |
| 482 GpuProcessHost::gpu_enabled() && | 482 GpuProcessHost::gpu_enabled() && |
| 483 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); | 483 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); |
| 484 prefs.force_compositing_mode = | 484 prefs.force_compositing_mode = |
| 485 content::IsForceCompositingModeEnabled() && | 485 content::IsForceCompositingModeEnabled() && |
| 486 !command_line.HasSwitch(switches::kDisableForceCompositingMode); | 486 !command_line.HasSwitch(switches::kDisableForceCompositingMode); |
| 487 prefs.accelerated_2d_canvas_enabled = | 487 prefs.accelerated_2d_canvas_enabled = |
| 488 GpuProcessHost::gpu_enabled() && | 488 GpuProcessHost::gpu_enabled() && |
| 489 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); | 489 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); |
| 490 prefs.deferred_2d_canvas_enabled = | |
| 491 !command_line.HasSwitch(switches::kDisableDeferred2dCanvas); | |
| 492 prefs.antialiased_2d_canvas_disabled = | 490 prefs.antialiased_2d_canvas_disabled = |
| 493 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing); | 491 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing); |
| 494 prefs.accelerated_filters_enabled = | 492 prefs.accelerated_filters_enabled = |
| 495 GpuProcessHost::gpu_enabled() && | 493 GpuProcessHost::gpu_enabled() && |
| 496 command_line.HasSwitch(switches::kEnableAcceleratedFilters); | 494 command_line.HasSwitch(switches::kEnableAcceleratedFilters); |
| 497 prefs.accelerated_compositing_for_3d_transforms_enabled = | 495 prefs.accelerated_compositing_for_3d_transforms_enabled = |
| 498 prefs.accelerated_compositing_for_animation_enabled = | 496 prefs.accelerated_compositing_for_animation_enabled = |
| 499 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); | 497 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); |
| 500 prefs.accelerated_compositing_for_plugins_enabled = | 498 prefs.accelerated_compositing_for_plugins_enabled = |
| 501 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); | 499 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); |
| (...skipping 3024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3526 } | 3524 } |
| 3527 | 3525 |
| 3528 BrowserPluginGuestManager* | 3526 BrowserPluginGuestManager* |
| 3529 WebContentsImpl::GetBrowserPluginGuestManager() const { | 3527 WebContentsImpl::GetBrowserPluginGuestManager() const { |
| 3530 return static_cast<BrowserPluginGuestManager*>( | 3528 return static_cast<BrowserPluginGuestManager*>( |
| 3531 GetBrowserContext()->GetUserData( | 3529 GetBrowserContext()->GetUserData( |
| 3532 browser_plugin::kBrowserPluginGuestManagerKeyName)); | 3530 browser_plugin::kBrowserPluginGuestManagerKeyName)); |
| 3533 } | 3531 } |
| 3534 | 3532 |
| 3535 } // namespace content | 3533 } // namespace content |
| OLD | NEW |