Index: cc/surfaces/direct_compositor_frame_sink.cc |
diff --git a/cc/surfaces/direct_compositor_frame_sink.cc b/cc/surfaces/direct_compositor_frame_sink.cc |
index 505d38ad0914acc436e7641685d1489688b9f16d..c4ded62c08b972885776b4c16157d8a62f4d34ef 100644 |
--- a/cc/surfaces/direct_compositor_frame_sink.cc |
+++ b/cc/surfaces/direct_compositor_frame_sink.cc |
@@ -99,15 +99,15 @@ void DirectCompositorFrameSink::SubmitCompositorFrame(CompositorFrame frame) { |
frame.metadata.begin_frame_ack.sequence_number); |
gfx::Size frame_size = frame.render_pass_list.back()->output_rect.size(); |
- if (frame_size.IsEmpty() || frame_size != last_swap_frame_size_) { |
- delegated_local_surface_id_ = local_surface_id_allocator_.GenerateId(); |
+ if (!local_surface_id_.is_valid() || frame_size != last_swap_frame_size_ || |
+ frame.metadata.device_scale_factor != device_scale_factor_) { |
+ local_surface_id_ = local_surface_id_allocator_.GenerateId(); |
last_swap_frame_size_ = frame_size; |
+ device_scale_factor_ = frame.metadata.device_scale_factor; |
+ display_->SetLocalSurfaceId(local_surface_id_, device_scale_factor_); |
} |
- display_->SetLocalSurfaceId(delegated_local_surface_id_, |
- frame.metadata.device_scale_factor); |
- support_->SubmitCompositorFrame(delegated_local_surface_id_, |
- std::move(frame)); |
+ support_->SubmitCompositorFrame(local_surface_id_, std::move(frame)); |
} |
void DirectCompositorFrameSink::DisplayOutputSurfaceLost() { |
@@ -148,6 +148,10 @@ void DirectCompositorFrameSink::WillDrawSurface( |
// TODO(staraz): Implement this. |
} |
+void DirectCompositorFrameSink::DidRejectCompositorFrame() { |
+ NOTREACHED(); |
+} |
+ |
void DirectCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frame) { |
support_->SetNeedsBeginFrame(needs_begin_frame); |
} |