Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3343)

Unified Diff: cc/trees/thread_proxy.cc

Issue 1194743002: cc: Remove ResourceUpdateQueue and ResourceUpdateController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resourcequeue: header Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | components/view_manager/surfaces/surfaces_scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 8ce9c3773463946ba6b71ee4a9093a15f273df19..153a9b86f22a2c7dd09f491983fc825cca982129 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -765,9 +765,6 @@ void ThreadProxy::BeginMainFrame(
main().can_cancel_commit && !begin_main_frame_state->evicted_ui_resources;
main().can_cancel_commit = true;
- scoped_ptr<ResourceUpdateQueue> queue =
- make_scoped_ptr(new ResourceUpdateQueue);
-
bool updated = layer_tree_host()->UpdateLayers();
layer_tree_host()->WillCommit();
@@ -818,11 +815,8 @@ void ThreadProxy::BeginMainFrame(
CompletionEvent completion;
Proxy::ImplThreadTaskRunner()->PostTask(
- FROM_HERE,
- base::Bind(&ThreadProxy::StartCommitOnImplThread,
- impl_thread_weak_ptr_,
- &completion,
- queue.release()));
+ FROM_HERE, base::Bind(&ThreadProxy::StartCommitOnImplThread,
+ impl_thread_weak_ptr_, &completion));
completion.Wait();
}
@@ -836,8 +830,7 @@ void ThreadProxy::BeginMainFrameNotExpectedSoon() {
layer_tree_host()->BeginMainFrameNotExpectedSoon();
}
-void ThreadProxy::StartCommitOnImplThread(CompletionEvent* completion,
- ResourceUpdateQueue* raw_queue) {
+void ThreadProxy::StartCommitOnImplThread(CompletionEvent* completion) {
TRACE_EVENT0("cc", "ThreadProxy::StartCommitOnImplThread");
DCHECK(!impl().commit_completion_event);
DCHECK(IsImplThread() && IsMainThreadBlocked());
@@ -854,17 +847,8 @@ void ThreadProxy::StartCommitOnImplThread(CompletionEvent* completion,
// Ideally, we should inform to impl thread when BeginMainFrame is started.
// But, we can avoid a PostTask in here.
impl().scheduler->NotifyBeginMainFrameStarted();
-
- scoped_ptr<ResourceUpdateQueue> queue(raw_queue);
-
impl().commit_completion_event = completion;
- impl().current_resource_update_controller = ResourceUpdateController::Create(
- this,
- Proxy::ImplThreadTaskRunner(),
- queue.Pass(),
- impl().layer_tree_host_impl->resource_provider());
- impl().current_resource_update_controller->PerformMoreUpdates(
- impl().scheduler->AnticipatedDrawTime());
+ impl().scheduler->NotifyReadyToCommit();
}
void ThreadProxy::BeginMainFrameAbortedOnImplThread(
@@ -912,11 +896,6 @@ void ThreadProxy::ScheduledActionCommit() {
DCHECK(IsImplThread());
DCHECK(IsMainThreadBlocked());
DCHECK(impl().commit_completion_event);
- DCHECK(impl().current_resource_update_controller);
-
- // Complete all remaining texture updates.
- impl().current_resource_update_controller->Finalize();
- impl().current_resource_update_controller = nullptr;
blocked_main().main_thread_inside_commit = true;
impl().layer_tree_host_impl->BeginCommit();
@@ -1063,11 +1042,6 @@ void ThreadProxy::ScheduledActionInvalidateOutputSurface() {
impl().layer_tree_host_impl->output_surface()->Invalidate();
}
-void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) {
- if (impl().current_resource_update_controller)
- impl().current_resource_update_controller->PerformMoreUpdates(time);
-}
-
base::TimeDelta ThreadProxy::DrawDurationEstimate() {
return impl().timing_history.DrawDurationEstimate();
}
@@ -1093,11 +1067,6 @@ void ThreadProxy::SetAuthoritativeVSyncInterval(
NOTREACHED() << "Only used by SingleThreadProxy";
}
-void ThreadProxy::ReadyToFinalizeTextureUpdates() {
- DCHECK(IsImplThread());
- impl().scheduler->NotifyReadyToCommit();
-}
-
void ThreadProxy::DidCommitAndDrawFrame() {
DCHECK(IsMainThread());
layer_tree_host()->DidCommitAndDrawFrame();
@@ -1172,7 +1141,6 @@ void ThreadProxy::LayerTreeHostClosedOnImplThread(CompletionEvent* completion) {
TRACE_EVENT0("cc", "ThreadProxy::LayerTreeHostClosedOnImplThread");
DCHECK(IsImplThread());
DCHECK(IsMainThreadBlocked());
- impl().current_resource_update_controller = nullptr;
impl().scheduler = nullptr;
impl().layer_tree_host_impl = nullptr;
impl().weak_factory.InvalidateWeakPtrs();
@@ -1183,10 +1151,6 @@ void ThreadProxy::LayerTreeHostClosedOnImplThread(CompletionEvent* completion) {
completion->Signal();
}
-size_t ThreadProxy::MaxPartialTextureUpdates() const {
- return ResourceUpdateController::MaxPartialTextureUpdates();
-}
-
ThreadProxy::BeginMainFrameAndCommitState::BeginMainFrameAndCommitState()
: memory_allocation_limit_bytes(0),
memory_allocation_priority_cutoff(0),
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | components/view_manager/surfaces/surfaces_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698