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_child_frame.h" | 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 CreateCompositorFrameSinkSupport(); | 361 CreateCompositorFrameSinkSupport(); |
362 has_frame_ = false; | 362 has_frame_ = false; |
363 } | 363 } |
364 | 364 |
365 void RenderWidgetHostViewChildFrame::ProcessCompositorFrame( | 365 void RenderWidgetHostViewChildFrame::ProcessCompositorFrame( |
366 const cc::LocalSurfaceId& local_surface_id, | 366 const cc::LocalSurfaceId& local_surface_id, |
367 cc::CompositorFrame frame) { | 367 cc::CompositorFrame frame) { |
368 current_surface_size_ = frame.render_pass_list.back()->output_rect.size(); | 368 current_surface_size_ = frame.render_pass_list.back()->output_rect.size(); |
369 current_surface_scale_factor_ = frame.metadata.device_scale_factor; | 369 current_surface_scale_factor_ = frame.metadata.device_scale_factor; |
370 | 370 |
371 bool result = | 371 support_->SubmitCompositorFrame(local_surface_id, std::move(frame)); |
372 support_->SubmitCompositorFrame(local_surface_id, std::move(frame)); | |
373 DCHECK(result); | |
374 has_frame_ = true; | 372 has_frame_ = true; |
375 | 373 |
376 if (local_surface_id_ != local_surface_id || HasEmbedderChanged()) { | 374 if (local_surface_id_ != local_surface_id || HasEmbedderChanged()) { |
377 local_surface_id_ = local_surface_id; | 375 local_surface_id_ = local_surface_id; |
378 SendSurfaceInfoToEmbedder(); | 376 SendSurfaceInfoToEmbedder(); |
379 } | 377 } |
380 | 378 |
381 ProcessFrameSwappedCallbacks(); | 379 ProcessFrameSwappedCallbacks(); |
382 } | 380 } |
383 | 381 |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 frame_sink_id_); | 724 frame_sink_id_); |
727 } | 725 } |
728 support_.reset(); | 726 support_.reset(); |
729 } | 727 } |
730 | 728 |
731 bool RenderWidgetHostViewChildFrame::HasEmbedderChanged() { | 729 bool RenderWidgetHostViewChildFrame::HasEmbedderChanged() { |
732 return false; | 730 return false; |
733 } | 731 } |
734 | 732 |
735 } // namespace content | 733 } // namespace content |
OLD | NEW |