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 "content/browser/frame_host/render_widget_host_view_guest.h" | 5 #include "content/browser/frame_host/render_widget_host_view_guest.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 scale_factor != current_surface_scale_factor_ || | 286 scale_factor != current_surface_scale_factor_ || |
287 guest_->has_attached_since_surface_set()) { | 287 guest_->has_attached_since_surface_set()) { |
288 ClearCompositorSurfaceIfNecessary(); | 288 ClearCompositorSurfaceIfNecessary(); |
289 last_output_surface_id_ = output_surface_id; | 289 last_output_surface_id_ = output_surface_id; |
290 current_surface_size_ = frame_size; | 290 current_surface_size_ = frame_size; |
291 current_surface_scale_factor_ = scale_factor; | 291 current_surface_scale_factor_ = scale_factor; |
292 } | 292 } |
293 | 293 |
294 if (!surface_factory_) { | 294 if (!surface_factory_) { |
295 cc::SurfaceManager* manager = GetSurfaceManager(); | 295 cc::SurfaceManager* manager = GetSurfaceManager(); |
296 surface_factory_ = base::WrapUnique(new cc::SurfaceFactory(manager, this)); | 296 surface_factory_ = base::MakeUnique<cc::SurfaceFactory>(manager, this); |
297 } | 297 } |
298 | 298 |
299 if (surface_id_.is_null()) { | 299 if (surface_id_.is_null()) { |
300 surface_id_ = id_allocator_->GenerateId(); | 300 surface_id_ = id_allocator_->GenerateId(); |
301 surface_factory_->Create(surface_id_); | 301 surface_factory_->Create(surface_id_); |
302 | 302 |
303 cc::SurfaceSequence sequence = cc::SurfaceSequence( | 303 cc::SurfaceSequence sequence = cc::SurfaceSequence( |
304 id_allocator_->client_id(), next_surface_sequence_++); | 304 id_allocator_->client_id(), next_surface_sequence_++); |
305 // The renderer process will satisfy this dependency when it creates a | 305 // The renderer process will satisfy this dependency when it creates a |
306 // SurfaceLayer. | 306 // SurfaceLayer. |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 gesture_event.data.scrollUpdate.inertialPhase == | 665 gesture_event.data.scrollUpdate.inertialPhase == |
666 blink::WebGestureEvent::MomentumPhase) { | 666 blink::WebGestureEvent::MomentumPhase) { |
667 return; | 667 return; |
668 } | 668 } |
669 host_->ForwardGestureEvent(gesture_event); | 669 host_->ForwardGestureEvent(gesture_event); |
670 return; | 670 return; |
671 } | 671 } |
672 } | 672 } |
673 | 673 |
674 } // namespace content | 674 } // namespace content |
OLD | NEW |