| 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 support_->SubmitCompositorFrame(local_surface_id, std::move(frame)); | 371 bool result = |
| 372 support_->SubmitCompositorFrame(local_surface_id, std::move(frame)); |
| 373 DCHECK(result); |
| 372 has_frame_ = true; | 374 has_frame_ = true; |
| 373 | 375 |
| 374 if (local_surface_id_ != local_surface_id || HasEmbedderChanged()) { | 376 if (local_surface_id_ != local_surface_id || HasEmbedderChanged()) { |
| 375 local_surface_id_ = local_surface_id; | 377 local_surface_id_ = local_surface_id; |
| 376 SendSurfaceInfoToEmbedder(); | 378 SendSurfaceInfoToEmbedder(); |
| 377 } | 379 } |
| 378 | 380 |
| 379 ProcessFrameSwappedCallbacks(); | 381 ProcessFrameSwappedCallbacks(); |
| 380 } | 382 } |
| 381 | 383 |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 frame_sink_id_); | 726 frame_sink_id_); |
| 725 } | 727 } |
| 726 support_.reset(); | 728 support_.reset(); |
| 727 } | 729 } |
| 728 | 730 |
| 729 bool RenderWidgetHostViewChildFrame::HasEmbedderChanged() { | 731 bool RenderWidgetHostViewChildFrame::HasEmbedderChanged() { |
| 730 return false; | 732 return false; |
| 731 } | 733 } |
| 732 | 734 |
| 733 } // namespace content | 735 } // namespace content |
| OLD | NEW |