| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 command_line.HasSwitch(switches::kShowPaintRects); | 473 command_line.HasSwitch(switches::kShowPaintRects); |
| 474 prefs.accelerated_compositing_enabled = | 474 prefs.accelerated_compositing_enabled = |
| 475 GpuProcessHost::gpu_enabled() && | 475 GpuProcessHost::gpu_enabled() && |
| 476 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); | 476 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); |
| 477 prefs.force_compositing_mode = | 477 prefs.force_compositing_mode = |
| 478 content::IsForceCompositingModeEnabled() && | 478 content::IsForceCompositingModeEnabled() && |
| 479 !command_line.HasSwitch(switches::kDisableForceCompositingMode); | 479 !command_line.HasSwitch(switches::kDisableForceCompositingMode); |
| 480 prefs.accelerated_2d_canvas_enabled = | 480 prefs.accelerated_2d_canvas_enabled = |
| 481 GpuProcessHost::gpu_enabled() && | 481 GpuProcessHost::gpu_enabled() && |
| 482 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); | 482 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); |
| 483 prefs.deferred_2d_canvas_enabled = | |
| 484 !command_line.HasSwitch(switches::kDisableDeferred2dCanvas); | |
| 485 prefs.antialiased_2d_canvas_disabled = | 483 prefs.antialiased_2d_canvas_disabled = |
| 486 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing); | 484 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing); |
| 487 prefs.accelerated_filters_enabled = | 485 prefs.accelerated_filters_enabled = |
| 488 GpuProcessHost::gpu_enabled() && | 486 GpuProcessHost::gpu_enabled() && |
| 489 command_line.HasSwitch(switches::kEnableAcceleratedFilters); | 487 command_line.HasSwitch(switches::kEnableAcceleratedFilters); |
| 490 prefs.accelerated_compositing_for_3d_transforms_enabled = | 488 prefs.accelerated_compositing_for_3d_transforms_enabled = |
| 491 prefs.accelerated_compositing_for_animation_enabled = | 489 prefs.accelerated_compositing_for_animation_enabled = |
| 492 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); | 490 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); |
| 493 prefs.accelerated_compositing_for_plugins_enabled = | 491 prefs.accelerated_compositing_for_plugins_enabled = |
| 494 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); | 492 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); |
| (...skipping 3038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3533 } | 3531 } |
| 3534 | 3532 |
| 3535 BrowserPluginGuestManager* | 3533 BrowserPluginGuestManager* |
| 3536 WebContentsImpl::GetBrowserPluginGuestManager() const { | 3534 WebContentsImpl::GetBrowserPluginGuestManager() const { |
| 3537 return static_cast<BrowserPluginGuestManager*>( | 3535 return static_cast<BrowserPluginGuestManager*>( |
| 3538 GetBrowserContext()->GetUserData( | 3536 GetBrowserContext()->GetUserData( |
| 3539 browser_plugin::kBrowserPluginGuestManagerKeyName)); | 3537 browser_plugin::kBrowserPluginGuestManagerKeyName)); |
| 3540 } | 3538 } |
| 3541 | 3539 |
| 3542 } // namespace content | 3540 } // namespace content |
| OLD | NEW |