Chromium Code Reviews| Index: content/browser/compositor/delegated_frame_host.cc |
| diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc |
| index 2650a769a64747ad24708362e4ebd647ad9a26a8..39643295ffe688c211e0d9f04210b7a44f23d0eb 100644 |
| --- a/content/browser/compositor/delegated_frame_host.cc |
| +++ b/content/browser/compositor/delegated_frame_host.cc |
| @@ -70,6 +70,7 @@ DelegatedFrameHost::DelegatedFrameHost(DelegatedFrameHostClient* client) |
| last_output_surface_id_(0), |
| pending_delegated_ack_count_(0), |
| skipped_frames_(false), |
| + force_commit_for_next_frame_(false), |
| current_scale_factor_(1.f), |
| can_lock_compositor_(YES_CAN_LOCK), |
| delegated_frame_evictor_(new DelegatedFrameEvictor(this)) { |
| @@ -349,6 +350,11 @@ void DelegatedFrameHost::SwapDelegatedFrame( |
| gfx::Rect damage_rect_in_dip = |
| gfx::ConvertRectToDIP(frame_device_scale_factor, damage_rect); |
| + if (compositor_ && force_commit_for_next_frame_) { |
| + force_commit_for_next_frame_ = false; |
| + compositor_->ScheduleDraw(); |
| + } |
| + |
| if (ShouldSkipFrame(frame_size_in_dip)) { |
| cc::CompositorFrameAck ack; |
| cc::TransferableResource::ReturnResources(frame_data->resource_list, |
| @@ -469,6 +475,7 @@ void DelegatedFrameHost::SwapDelegatedFrame( |
| } |
| released_front_lock_ = NULL; |
| current_frame_size_in_dip_ = frame_size_in_dip; |
| + |
| CheckResizeLock(); |
| if (!damage_rect_in_dip.IsEmpty()) |
| @@ -1033,6 +1040,8 @@ void DelegatedFrameHost::RequestCopyOfOutput( |
| request_copy_of_output_callback_for_testing_.Run(request.Pass()); |
| else |
| client_->DelegatedFrameHostGetLayer()->RequestCopyOfOutput(request.Pass()); |
| + |
| + force_commit_for_next_frame_ = true; |
|
miu
2015/12/02 20:32:57
Idea: Should you also call compositor_->ScheduleDr
ccameron
2015/12/02 23:03:22
That would seem like a separate bug if we're not g
miu
2015/12/03 00:23:41
Acknowledged.
|
| } |
| void DelegatedFrameHost::UnlockResources() { |