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

Unified Diff: services/ui/ws/frame_generator.cc

Issue 2400593002: Mus+Ash: Fix the FrameSinkId of the FrameGenerator's CompositorFrameSink (Closed)
Patch Set: Fixed FrameGeneratorTest Created 4 years, 2 months 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 | « services/ui/ws/frame_generator.h ('k') | services/ui/ws/frame_generator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/frame_generator.cc
diff --git a/services/ui/ws/frame_generator.cc b/services/ui/ws/frame_generator.cc
index 163546e0c78ed75b8ade196041813d21b57bf041..d5b8c3cd6866c88bdd3cbbc3f5643dad597e5563 100644
--- a/services/ui/ws/frame_generator.cc
+++ b/services/ui/ws/frame_generator.cc
@@ -26,6 +26,7 @@ FrameGenerator::FrameGenerator(
scoped_refptr<DisplayCompositor> display_compositor)
: delegate_(delegate),
display_compositor_(display_compositor),
+ frame_sink_id_(0, display_compositor->GenerateNextClientId()),
draw_timer_(false, false),
weak_factory_(this) {
DCHECK(delegate_);
@@ -42,8 +43,8 @@ void FrameGenerator::OnGpuChannelEstablished(
scoped_refptr<gpu::GpuChannelHost> channel) {
if (widget_ != gfx::kNullAcceleratedWidget) {
compositor_frame_sink_ = base::MakeUnique<surfaces::CompositorFrameSink>(
- base::ThreadTaskRunnerHandle::Get(), widget_, std::move(channel),
- display_compositor_);
+ frame_sink_id_, base::ThreadTaskRunnerHandle::Get(), widget_,
+ std::move(channel), display_compositor_);
} else {
gpu_channel_ = std::move(channel);
}
@@ -59,8 +60,8 @@ void FrameGenerator::OnAcceleratedWidgetAvailable(
widget_ = widget;
if (gpu_channel_ && widget != gfx::kNullAcceleratedWidget) {
compositor_frame_sink_.reset(new surfaces::CompositorFrameSink(
- base::ThreadTaskRunnerHandle::Get(), widget_, std::move(gpu_channel_),
- display_compositor_));
+ frame_sink_id_, base::ThreadTaskRunnerHandle::Get(), widget_,
+ std::move(gpu_channel_), display_compositor_));
}
}
« no previous file with comments | « services/ui/ws/frame_generator.h ('k') | services/ui/ws/frame_generator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698