diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/cc/trees/proxy_impl.cc | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/cc/trees/proxy_impl.cc')
-rw-r--r-- | chromium/cc/trees/proxy_impl.cc | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/chromium/cc/trees/proxy_impl.cc b/chromium/cc/trees/proxy_impl.cc index 544ad6392e3..24e222ffbe0 100644 --- a/chromium/cc/trees/proxy_impl.cc +++ b/chromium/cc/trees/proxy_impl.cc @@ -370,26 +370,10 @@ void ProxyImpl::SetVideoNeedsBeginFrames(bool needs_begin_frames) { scheduler_->SetVideoNeedsBeginFrames(needs_begin_frames); } -size_t ProxyImpl::CompositedAnimationsCount() const { - return host_impl_->mutator_host()->CompositedAnimationsCount(); -} - -size_t ProxyImpl::MainThreadAnimationsCount() const { - return host_impl_->mutator_host()->MainThreadAnimationsCount(); -} - bool ProxyImpl::HasCustomPropertyAnimations() const { return host_impl_->mutator_host()->HasCustomPropertyAnimations(); } -bool ProxyImpl::CurrentFrameHadRAF() const { - return host_impl_->mutator_host()->CurrentFrameHadRAF(); -} - -bool ProxyImpl::NextFrameHasPendingRAF() const { - return host_impl_->mutator_host()->NextFrameHasPendingRAF(); -} - bool ProxyImpl::IsInsideDraw() { return inside_draw_; } @@ -542,14 +526,37 @@ void ProxyImpl::NotifyThroughputTrackerResults(CustomTrackerResults results) { proxy_main_weak_ptr_, std::move(results))); } +void ProxyImpl::SubmitThroughputData(ukm::SourceId source_id, + int aggregated_percent, + int impl_percent, + base::Optional<int> main_percent) { + DCHECK(IsImplThread()); + MainThreadTaskRunner()->PostTask( + FROM_HERE, + base::BindOnce(&ProxyMain::SubmitThroughputData, proxy_main_weak_ptr_, + source_id, aggregated_percent, impl_percent, + main_percent)); +} + +void ProxyImpl::DidObserveFirstScrollDelay( + base::TimeDelta first_scroll_delay, + base::TimeTicks first_scroll_timestamp) { + DCHECK(IsImplThread()); + MainThreadTaskRunner()->PostTask( + FROM_HERE, base::BindOnce(&ProxyMain::DidObserveFirstScrollDelay, + proxy_main_weak_ptr_, first_scroll_delay, + first_scroll_timestamp)); +} + bool ProxyImpl::WillBeginImplFrame(const viz::BeginFrameArgs& args) { DCHECK(IsImplThread()); return host_impl_->WillBeginImplFrame(args); } -void ProxyImpl::DidFinishImplFrame() { +void ProxyImpl::DidFinishImplFrame( + const viz::BeginFrameArgs& last_activated_args) { DCHECK(IsImplThread()); - host_impl_->DidFinishImplFrame(scheduler_->last_activate_origin_frame_args()); + host_impl_->DidFinishImplFrame(last_activated_args); } void ProxyImpl::DidNotProduceFrame(const viz::BeginFrameAck& ack, @@ -703,9 +710,6 @@ DrawResult ProxyImpl::DrawInternal(bool forced_draw) { base::AutoReset<bool> mark_inside(&inside_draw_, true); - if (host_impl_->pending_tree()) - host_impl_->pending_tree()->UpdateDrawProperties(); - // This method is called on a forced draw, regardless of whether we are able // to produce a frame, as the calling site on main thread is blocked until its // request completes, and we signal completion here. If CanDraw() is false, we @@ -756,6 +760,12 @@ DrawResult ProxyImpl::DrawInternal(bool forced_draw) { proxy_main_weak_ptr_)); } + // The tile visibility/priority of the pending tree needs to be updated so + // that it doesn't get activated before the raster is complete. But this needs + // to happen after the draw, off of the critical path to draw. + if (host_impl_->pending_tree()) + host_impl_->pending_tree()->UpdateDrawProperties(); + DCHECK_NE(INVALID_RESULT, result); return result; } |