| Index: cc/surfaces/surface.cc
|
| diff --git a/cc/surfaces/surface.cc b/cc/surfaces/surface.cc
|
| index 3e16c6928a05e7f2d273785305693021a121491b..a4dcc60b4935e126a03415bec5105295aae09bc9 100644
|
| --- a/cc/surfaces/surface.cc
|
| +++ b/cc/surfaces/surface.cc
|
| @@ -58,6 +58,22 @@ void Surface::SetPreviousFrameSurface(Surface* surface) {
|
| void Surface::QueueFrame(CompositorFrame frame, const DrawCallback& callback) {
|
| TakeLatencyInfoFromPendingFrame(&frame.metadata.latency_info);
|
|
|
| + if (!frame.render_pass_list.empty()) {
|
| + gfx::Size frame_size = frame.render_pass_list.back()->output_rect.size();
|
| + float device_scale_factor = frame.metadata.device_scale_factor;
|
| +
|
| + SurfaceInfo surface_info(surface_id_, device_scale_factor, frame_size);
|
| +
|
| + if (!surface_info_)
|
| + surface_info_ = surface_info;
|
| +
|
| + if (surface_info_ != surface_info) {
|
| + DCHECK(factory_);
|
| + factory_->OnBadFrameReceived();
|
| + return;
|
| + }
|
| + }
|
| +
|
| base::Optional<CompositorFrame> previous_pending_frame =
|
| std::move(pending_frame_);
|
| pending_frame_.reset();
|
|
|