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/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 if (command_line.HasSwitch(switches::kEnableLayerSquashing)) | 407 if (command_line.HasSwitch(switches::kEnableLayerSquashing)) |
408 prefs.layer_squashing_enabled = true; | 408 prefs.layer_squashing_enabled = true; |
409 if (command_line.HasSwitch(switches::kDisableLayerSquashing)) | 409 if (command_line.HasSwitch(switches::kDisableLayerSquashing)) |
410 prefs.layer_squashing_enabled = false; | 410 prefs.layer_squashing_enabled = false; |
411 | 411 |
412 prefs.show_paint_rects = | 412 prefs.show_paint_rects = |
413 command_line.HasSwitch(switches::kShowPaintRects); | 413 command_line.HasSwitch(switches::kShowPaintRects); |
414 prefs.accelerated_compositing_enabled = | 414 prefs.accelerated_compositing_enabled = |
415 GpuProcessHost::gpu_enabled() && | 415 GpuProcessHost::gpu_enabled() && |
416 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); | 416 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); |
417 prefs.force_compositing_mode = content::IsForceCompositingModeEnabled(); | 417 prefs.force_compositing_mode = |
| 418 content::IsForceCompositingModeEnabled() && |
| 419 !command_line.HasSwitch(switches::kDisableForceCompositingMode); |
418 prefs.accelerated_2d_canvas_enabled = | 420 prefs.accelerated_2d_canvas_enabled = |
419 GpuProcessHost::gpu_enabled() && | 421 GpuProcessHost::gpu_enabled() && |
420 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); | 422 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); |
421 prefs.antialiased_2d_canvas_disabled = | 423 prefs.antialiased_2d_canvas_disabled = |
422 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing); | 424 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing); |
423 prefs.accelerated_2d_canvas_msaa_sample_count = | 425 prefs.accelerated_2d_canvas_msaa_sample_count = |
424 atoi(command_line.GetSwitchValueASCII( | 426 atoi(command_line.GetSwitchValueASCII( |
425 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); | 427 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); |
426 prefs.deferred_filters_enabled = | 428 prefs.deferred_filters_enabled = |
427 command_line.HasSwitch(switches::kEnableDeferredFilters); | 429 command_line.HasSwitch(switches::kEnableDeferredFilters); |
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1921 return true; | 1923 return true; |
1922 } | 1924 } |
1923 | 1925 |
1924 void RenderViewHostImpl::AttachToFrameTree() { | 1926 void RenderViewHostImpl::AttachToFrameTree() { |
1925 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1927 FrameTree* frame_tree = delegate_->GetFrameTree(); |
1926 | 1928 |
1927 frame_tree->ResetForMainFrameSwap(); | 1929 frame_tree->ResetForMainFrameSwap(); |
1928 } | 1930 } |
1929 | 1931 |
1930 } // namespace content | 1932 } // namespace content |
OLD | NEW |