OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/bind_helpers.h" | 5 #include "base/bind_helpers.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "cc/surfaces/surface.h" | 9 #include "cc/surfaces/surface.h" |
10 #include "cc/surfaces/surface_factory.h" | 10 #include "cc/surfaces/surface_factory.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // the embedder's renderer to be composited. | 218 // the embedder's renderer to be composited. |
219 if (!frame->delegated_frame_data || !use_surfaces_) { | 219 if (!frame->delegated_frame_data || !use_surfaces_) { |
220 guest_->SwapCompositorFrame(output_surface_id, | 220 guest_->SwapCompositorFrame(output_surface_id, |
221 host_->GetProcess()->GetID(), | 221 host_->GetProcess()->GetID(), |
222 host_->GetRoutingID(), | 222 host_->GetRoutingID(), |
223 frame.Pass()); | 223 frame.Pass()); |
224 return; | 224 return; |
225 } | 225 } |
226 | 226 |
227 cc::RenderPass* root_pass = | 227 cc::RenderPass* root_pass = |
228 frame->delegated_frame_data->render_pass_list.back(); | 228 frame->delegated_frame_data->render_pass_list.back().get(); |
229 | 229 |
230 gfx::Size frame_size = root_pass->output_rect.size(); | 230 gfx::Size frame_size = root_pass->output_rect.size(); |
231 float scale_factor = frame->metadata.device_scale_factor; | 231 float scale_factor = frame->metadata.device_scale_factor; |
232 | 232 |
233 // Check whether we need to recreate the cc::Surface, which means the child | 233 // Check whether we need to recreate the cc::Surface, which means the child |
234 // frame renderer has changed its output surface, or size, or scale factor. | 234 // frame renderer has changed its output surface, or size, or scale factor. |
235 if (output_surface_id != last_output_surface_id_ && surface_factory_) { | 235 if (output_surface_id != last_output_surface_id_ && surface_factory_) { |
236 surface_factory_->Destroy(surface_id_); | 236 surface_factory_->Destroy(surface_id_); |
237 surface_factory_.reset(); | 237 surface_factory_.reset(); |
238 } | 238 } |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && | 717 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && |
718 gesture_event.data.scrollUpdate.inertial) { | 718 gesture_event.data.scrollUpdate.inertial) { |
719 return; | 719 return; |
720 } | 720 } |
721 host_->ForwardGestureEvent(gesture_event); | 721 host_->ForwardGestureEvent(gesture_event); |
722 return; | 722 return; |
723 } | 723 } |
724 } | 724 } |
725 | 725 |
726 } // namespace content | 726 } // namespace content |
OLD | NEW |