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

Unified Diff: ui/aura/mus/window_compositor_frame_sink.cc

Issue 2527443002: Display Compositor: Allocate LocalFrameId in client. (Closed)
Patch Set: Rebased + Restored BUILD files 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
« no previous file with comments | « ui/aura/mus/window_compositor_frame_sink.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_compositor_frame_sink.cc
diff --git a/ui/aura/mus/window_compositor_frame_sink.cc b/ui/aura/mus/window_compositor_frame_sink.cc
index 1490457984d89ace1218ba6eede5a6ce22928b8c..a6819646ebf5a4ebd47a378577c4f5c90df93060 100644
--- a/ui/aura/mus/window_compositor_frame_sink.cc
+++ b/ui/aura/mus/window_compositor_frame_sink.cc
@@ -64,14 +64,23 @@ 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_size_;
+ 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(
scoped_refptr<cc::ContextProvider> context_provider,
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
- mojo::InterfacePtrInfo<cc::mojom::MojoCompositorFrameSink>
- compositor_frame_sink_info,
+ cc::mojom::MojoCompositorFrameSinkPtrInfo compositor_frame_sink_info,
cc::mojom::MojoCompositorFrameSinkClientRequest client_request)
: cc::CompositorFrameSink(std::move(context_provider),
nullptr,
« no previous file with comments | « ui/aura/mus/window_compositor_frame_sink.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698