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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 prefs.accelerated_compositing_for_scrollable_frames_enabled = true; | 526 prefs.accelerated_compositing_for_scrollable_frames_enabled = true; |
527 if (command_line.HasSwitch(switches::kDisableAcceleratedScrollableFrames)) | 527 if (command_line.HasSwitch(switches::kDisableAcceleratedScrollableFrames)) |
528 prefs.accelerated_compositing_for_scrollable_frames_enabled = false; | 528 prefs.accelerated_compositing_for_scrollable_frames_enabled = false; |
529 | 529 |
530 prefs.composited_scrolling_for_frames_enabled = false; | 530 prefs.composited_scrolling_for_frames_enabled = false; |
531 if (command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames)) | 531 if (command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames)) |
532 prefs.composited_scrolling_for_frames_enabled = true; | 532 prefs.composited_scrolling_for_frames_enabled = true; |
533 if (command_line.HasSwitch(switches::kDisableCompositedScrollingForFrames)) | 533 if (command_line.HasSwitch(switches::kDisableCompositedScrollingForFrames)) |
534 prefs.composited_scrolling_for_frames_enabled = false; | 534 prefs.composited_scrolling_for_frames_enabled = false; |
535 | 535 |
| 536 prefs.universal_accelerated_compositing_for_overflow_scroll_enabled = false; |
| 537 if (command_line.HasSwitch( |
| 538 switches::kEnableUniversalAcceleratedOverflowScroll)) |
| 539 prefs.universal_accelerated_compositing_for_overflow_scroll_enabled = true; |
| 540 if (command_line.HasSwitch( |
| 541 switches::kDisableUniversalAcceleratedOverflowScroll)) |
| 542 prefs.universal_accelerated_compositing_for_overflow_scroll_enabled = false; |
| 543 |
536 prefs.show_paint_rects = | 544 prefs.show_paint_rects = |
537 command_line.HasSwitch(switches::kShowPaintRects); | 545 command_line.HasSwitch(switches::kShowPaintRects); |
538 prefs.accelerated_compositing_enabled = | 546 prefs.accelerated_compositing_enabled = |
539 GpuProcessHost::gpu_enabled() && | 547 GpuProcessHost::gpu_enabled() && |
540 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); | 548 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); |
541 prefs.force_compositing_mode = | 549 prefs.force_compositing_mode = |
542 content::IsForceCompositingModeEnabled() && | 550 content::IsForceCompositingModeEnabled() && |
543 !command_line.HasSwitch(switches::kDisableForceCompositingMode); | 551 !command_line.HasSwitch(switches::kDisableForceCompositingMode); |
544 prefs.accelerated_2d_canvas_enabled = | 552 prefs.accelerated_2d_canvas_enabled = |
545 GpuProcessHost::gpu_enabled() && | 553 GpuProcessHost::gpu_enabled() && |
(...skipping 3266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3812 } | 3820 } |
3813 | 3821 |
3814 void WebContentsImpl::OnFrameRemoved( | 3822 void WebContentsImpl::OnFrameRemoved( |
3815 RenderViewHostImpl* render_view_host, | 3823 RenderViewHostImpl* render_view_host, |
3816 int64 frame_id) { | 3824 int64 frame_id) { |
3817 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3825 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
3818 FrameDetached(render_view_host, frame_id)); | 3826 FrameDetached(render_view_host, frame_id)); |
3819 } | 3827 } |
3820 | 3828 |
3821 } // namespace content | 3829 } // namespace content |
OLD | NEW |