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/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "content/common/input/synthetic_gesture_packet.h" | 29 #include "content/common/input/synthetic_gesture_packet.h" |
30 #include "content/common/input/web_input_event_traits.h" | 30 #include "content/common/input/web_input_event_traits.h" |
31 #include "content/common/input_messages.h" | 31 #include "content/common/input_messages.h" |
32 #include "content/common/swapped_out_messages.h" | 32 #include "content/common/swapped_out_messages.h" |
33 #include "content/common/view_messages.h" | 33 #include "content/common/view_messages.h" |
34 #include "content/public/common/content_switches.h" | 34 #include "content/public/common/content_switches.h" |
35 #include "content/public/common/context_menu_params.h" | 35 #include "content/public/common/context_menu_params.h" |
36 #include "content/renderer/cursor_utils.h" | 36 #include "content/renderer/cursor_utils.h" |
37 #include "content/renderer/external_popup_menu.h" | 37 #include "content/renderer/external_popup_menu.h" |
38 #include "content/renderer/gpu/compositor_output_surface.h" | 38 #include "content/renderer/gpu/compositor_output_surface.h" |
39 #include "content/renderer/gpu/compositor_software_output_device.h" | |
40 #include "content/renderer/gpu/delegated_compositor_output_surface.h" | 39 #include "content/renderer/gpu/delegated_compositor_output_surface.h" |
41 #include "content/renderer/gpu/frame_swap_message_queue.h" | 40 #include "content/renderer/gpu/frame_swap_message_queue.h" |
42 #include "content/renderer/gpu/mailbox_output_surface.h" | 41 #include "content/renderer/gpu/mailbox_output_surface.h" |
43 #include "content/renderer/gpu/queue_message_swap_promise.h" | 42 #include "content/renderer/gpu/queue_message_swap_promise.h" |
44 #include "content/renderer/gpu/render_widget_compositor.h" | 43 #include "content/renderer/gpu/render_widget_compositor.h" |
45 #include "content/renderer/ime_event_guard.h" | 44 #include "content/renderer/ime_event_guard.h" |
46 #include "content/renderer/input/input_handler_manager.h" | 45 #include "content/renderer/input/input_handler_manager.h" |
47 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" | 46 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
48 #include "content/renderer/render_frame_impl.h" | 47 #include "content/renderer/render_frame_impl.h" |
49 #include "content/renderer/render_frame_proxy.h" | 48 #include "content/renderer/render_frame_proxy.h" |
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1027 | 1026 |
1028 uint32 output_surface_id = next_output_surface_id_++; | 1027 uint32 output_surface_id = next_output_surface_id_++; |
1029 if (command_line.HasSwitch(switches::kEnableDelegatedRenderer)) { | 1028 if (command_line.HasSwitch(switches::kEnableDelegatedRenderer)) { |
1030 DCHECK(compositor_deps_->GetCompositorImplThreadTaskRunner()); | 1029 DCHECK(compositor_deps_->GetCompositorImplThreadTaskRunner()); |
1031 return scoped_ptr<cc::OutputSurface>(new DelegatedCompositorOutputSurface( | 1030 return scoped_ptr<cc::OutputSurface>(new DelegatedCompositorOutputSurface( |
1032 routing_id(), output_surface_id, context_provider, | 1031 routing_id(), output_surface_id, context_provider, |
1033 worker_context_provider, frame_swap_message_queue_)); | 1032 worker_context_provider, frame_swap_message_queue_)); |
1034 } | 1033 } |
1035 if (!context_provider.get()) { | 1034 if (!context_provider.get()) { |
1036 scoped_ptr<cc::SoftwareOutputDevice> software_device( | 1035 scoped_ptr<cc::SoftwareOutputDevice> software_device( |
1037 new CompositorSoftwareOutputDevice()); | 1036 new cc::SoftwareOutputDevice()); |
1038 | 1037 |
1039 return scoped_ptr<cc::OutputSurface>(new CompositorOutputSurface( | 1038 return scoped_ptr<cc::OutputSurface>(new CompositorOutputSurface( |
1040 routing_id(), output_surface_id, nullptr, nullptr, | 1039 routing_id(), output_surface_id, nullptr, nullptr, |
1041 software_device.Pass(), frame_swap_message_queue_, true)); | 1040 software_device.Pass(), frame_swap_message_queue_, true)); |
1042 } | 1041 } |
1043 | 1042 |
1044 if (command_line.HasSwitch(cc::switches::kCompositeToMailbox)) { | 1043 if (command_line.HasSwitch(cc::switches::kCompositeToMailbox)) { |
1045 // Composite-to-mailbox is currently used for layout tests in order to cause | 1044 // Composite-to-mailbox is currently used for layout tests in order to cause |
1046 // them to draw inside in the renderer to do the readback there. This should | 1045 // them to draw inside in the renderer to do the readback there. This should |
1047 // no longer be the case when crbug.com/311404 is fixed. | 1046 // no longer be the case when crbug.com/311404 is fixed. |
(...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2440 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2439 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
2441 video_hole_frames_.AddObserver(frame); | 2440 video_hole_frames_.AddObserver(frame); |
2442 } | 2441 } |
2443 | 2442 |
2444 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2443 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
2445 video_hole_frames_.RemoveObserver(frame); | 2444 video_hole_frames_.RemoveObserver(frame); |
2446 } | 2445 } |
2447 #endif // defined(VIDEO_HOLE) | 2446 #endif // defined(VIDEO_HOLE) |
2448 | 2447 |
2449 } // namespace content | 2448 } // namespace content |
OLD | NEW |