Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2657)

Unified Diff: services/ui/public/cpp/window_compositor_frame_sink.cc

Issue 2527443002: Display Compositor: Allocate LocalFrameId in client. (Closed)
Patch Set: Addressed sadrul's comment Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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(

Powered by Google App Engine
This is Rietveld 408576698