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

Unified Diff: cc/trees/thread_proxy.cc

Issue 363383002: Forward input tasks to the Blink scheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. DefaultMainThreadTaskRunner now dispatches properly. Created 6 years, 5 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') | content/browser/renderer_host/compositor_impl_android.cc » ('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 56ce577b9d65110eda1e33f3f53a9992f558aabe..751ecaeb46b9add7e880a5dfb45a7ee16d8c3018 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -61,15 +61,19 @@ struct ThreadProxy::SchedulerStateRequest {
scoped_ptr<Proxy> ThreadProxy::Create(
LayerTreeHost* layer_tree_host,
+ scoped_refptr<cc::MainThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) {
- return make_scoped_ptr(new ThreadProxy(layer_tree_host, impl_task_runner))
+ return make_scoped_ptr(new ThreadProxy(layer_tree_host,
+ main_task_runner,
+ impl_task_runner))
.PassAs<Proxy>();
}
ThreadProxy::ThreadProxy(
LayerTreeHost* layer_tree_host,
+ scoped_refptr<cc::MainThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner)
- : Proxy(impl_task_runner),
+ : Proxy(main_task_runner, impl_task_runner),
main_thread_only_vars_unsafe_(this, layer_tree_host->id()),
main_thread_or_blocked_vars_unsafe_(layer_tree_host),
compositor_thread_vars_unsafe_(this, layer_tree_host->id()) {
@@ -462,12 +466,14 @@ void ThreadProxy::SetDeferCommits(bool defer_commits) {
else
TRACE_EVENT_ASYNC_END0("cc", "ThreadProxy::SetDeferCommits", this);
- if (!main().defer_commits && main().pending_deferred_commit)
- Proxy::MainThreadTaskRunner()->PostTask(
+ if (!main().defer_commits && main().pending_deferred_commit) {
+ Proxy::MainThreadTaskRunner()->PostBeginMainFrameTask(
FROM_HERE,
base::Bind(&ThreadProxy::BeginMainFrame,
main_thread_weak_ptr_,
- base::Passed(&main().pending_deferred_commit)));
+ base::Passed(&main().pending_deferred_commit)),
+ 0, 0, 0);
+ }
}
bool ThreadProxy::CommitRequested() const {
@@ -705,11 +711,12 @@ void ThreadProxy::ScheduledActionSendBeginMainFrame() {
impl().layer_tree_host_impl->memory_allocation_priority_cutoff();
begin_main_frame_state->evicted_ui_resources =
impl().layer_tree_host_impl->EvictedUIResourcesExist();
- Proxy::MainThreadTaskRunner()->PostTask(
+ Proxy::MainThreadTaskRunner()->PostBeginMainFrameTask(
FROM_HERE,
base::Bind(&ThreadProxy::BeginMainFrame,
main_thread_weak_ptr_,
- base::Passed(&begin_main_frame_state)));
+ base::Passed(&begin_main_frame_state)),
+ 0, 0, 0);
mithro-old 2014/07/08 11:18:51 This line I don't quite understand? Isn't all the
Sami 2014/07/08 11:23:15 Yes, the data is inside begin_main_frame_state, bu
devtools_instrumentation::DidRequestMainThreadFrame(
impl().layer_tree_host_id);
impl().timing_history.DidBeginMainFrame();
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698