| Index: cc/surfaces/surface_factory.cc
|
| diff --git a/cc/surfaces/surface_factory.cc b/cc/surfaces/surface_factory.cc
|
| index 36a79ee9e9ad0557aa92978a661bb961dd56ed6b..3e3ace3135189b5edc4a68869c8ba1a7fe1b048c 100644
|
| --- a/cc/surfaces/surface_factory.cc
|
| +++ b/cc/surfaces/surface_factory.cc
|
| @@ -85,14 +85,18 @@ void SurfaceFactory::SubmitCompositorFrame(const LocalFrameId& local_frame_id,
|
| OwningSurfaceMap::iterator it = surface_map_.find(local_frame_id);
|
| DCHECK(it != surface_map_.end());
|
| DCHECK(it->second->factory().get() == this);
|
| + const CompositorFrame& previous_frame = it->second->GetEligibleFrame();
|
| // Tell the SurfaceManager if this is the first frame submitted with this
|
| // LocalFrameId.
|
| - if (!it->second->HasFrame()) {
|
| + if (!previous_frame.delegated_frame_data) {
|
| float device_scale_factor = frame.metadata.device_scale_factor;
|
| gfx::Size frame_size;
|
| // CompositorFrames may not be populated with a RenderPass in unit tests.
|
| - if (!frame.render_pass_list.empty())
|
| - frame_size = frame.render_pass_list[0]->output_rect.size();
|
| + if (frame.delegated_frame_data &&
|
| + !frame.delegated_frame_data->render_pass_list.empty()) {
|
| + frame_size =
|
| + frame.delegated_frame_data->render_pass_list[0]->output_rect.size();
|
| + }
|
| manager_->SurfaceCreated(it->second->surface_id(), frame_size,
|
| device_scale_factor);
|
| }
|
|
|