| 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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/debug/trace_event_synthetic_delay.h" | 10 #include "base/debug/trace_event_synthetic_delay.h" |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 uint32 output_surface_id = next_output_surface_id_++; | 907 uint32 output_surface_id = next_output_surface_id_++; |
| 908 if (command_line.HasSwitch(switches::kEnableDelegatedRenderer)) { | 908 if (command_line.HasSwitch(switches::kEnableDelegatedRenderer)) { |
| 909 DCHECK(is_threaded_compositing_enabled_); | 909 DCHECK(is_threaded_compositing_enabled_); |
| 910 return scoped_ptr<cc::OutputSurface>( | 910 return scoped_ptr<cc::OutputSurface>( |
| 911 new DelegatedCompositorOutputSurface( | 911 new DelegatedCompositorOutputSurface( |
| 912 routing_id(), | 912 routing_id(), |
| 913 output_surface_id, | 913 output_surface_id, |
| 914 context_provider)); | 914 context_provider)); |
| 915 } | 915 } |
| 916 if (!context_provider.get()) { | 916 if (!context_provider.get()) { |
| 917 if (!command_line.HasSwitch(switches::kEnableSoftwareCompositing)) | |
| 918 return scoped_ptr<cc::OutputSurface>(); | |
| 919 | |
| 920 scoped_ptr<cc::SoftwareOutputDevice> software_device( | 917 scoped_ptr<cc::SoftwareOutputDevice> software_device( |
| 921 new CompositorSoftwareOutputDevice()); | 918 new CompositorSoftwareOutputDevice()); |
| 922 | 919 |
| 923 return scoped_ptr<cc::OutputSurface>(new CompositorOutputSurface( | 920 return scoped_ptr<cc::OutputSurface>(new CompositorOutputSurface( |
| 924 routing_id(), | 921 routing_id(), |
| 925 output_surface_id, | 922 output_surface_id, |
| 926 NULL, | 923 NULL, |
| 927 software_device.Pass(), | 924 software_device.Pass(), |
| 928 true)); | 925 true)); |
| 929 } | 926 } |
| (...skipping 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2820 | 2817 |
| 2821 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2818 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
| 2822 swapped_out_frames_.AddObserver(frame); | 2819 swapped_out_frames_.AddObserver(frame); |
| 2823 } | 2820 } |
| 2824 | 2821 |
| 2825 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2822 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
| 2826 swapped_out_frames_.RemoveObserver(frame); | 2823 swapped_out_frames_.RemoveObserver(frame); |
| 2827 } | 2824 } |
| 2828 | 2825 |
| 2829 } // namespace content | 2826 } // namespace content |
| OLD | NEW |