Chromium Code Reviews| Index: services/ui/public/cpp/window_compositor_frame_sink.cc |
| diff --git a/services/ui/public/cpp/window_compositor_frame_sink.cc b/services/ui/public/cpp/window_compositor_frame_sink.cc |
| index 3249087189577c58dd353e56662d1ff4d0551a05..c5e0c8e4ed4638e385c7736e59ffc0373ffded57 100644 |
| --- a/services/ui/public/cpp/window_compositor_frame_sink.cc |
| +++ b/services/ui/public/cpp/window_compositor_frame_sink.cc |
| @@ -65,7 +65,17 @@ void WindowCompositorFrameSink::SubmitCompositorFrame( |
| DCHECK(thread_checker_->CalledOnValidThread()); |
| if (!compositor_frame_sink_) |
| return; |
| - compositor_frame_sink_->SubmitCompositorFrame(std::move(frame)); |
| + |
| + gfx::Size frame_size = last_submitted_frame_sink_; |
|
sadrul
2016/11/22 19:53:29
*size_
Fady Samuel
2016/11/22 20:17:26
Done.
|
| + if (!frame.render_pass_list.empty()) |
| + frame_size = frame.render_pass_list[0]->output_rect.size(); |
| + if (!local_frame_id_.is_valid() || frame_size != last_submitted_frame_size_) |
| + local_frame_id_ = id_allocator_.GenerateId(); |
| + |
| + compositor_frame_sink_->SubmitCompositorFrame(local_frame_id_, |
| + std::move(frame)); |
| + |
| + last_submitted_frame_size_ = frame_size; |
| } |
| WindowCompositorFrameSink::WindowCompositorFrameSink( |