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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 648403004: Schedule ResourceDispatch messages via a Filter Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: It should compile now Created 6 years, 2 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 | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index b9fd1826127a5ab937811bdb1913975da7eb17bf..f76416be4cf2d16e05813281993106964a2631b1 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -44,6 +44,7 @@
#include "content/child/npapi/npobject_util.h"
#include "content/child/plugin_messages.h"
#include "content/child/resource_dispatcher.h"
+#include "content/child/resource_scheduling_filter.h"
#include "content/child/runtime_features.h"
#include "content/child/thread_safe_sender.h"
#include "content/child/web_database_observer_impl.h"
@@ -852,6 +853,14 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
main_thread_compositor_task_runner_ = base::MessageLoopProxy::current();
+ // Add a filter that forces resource messages to be dispatched via a
+ // particular task runner.
+ // FIXME: hook this up to the blink scheduler.
+ resource_scheduling_filter_ = new ResourceSchedulingFilter(
+ base::MessageLoopProxy::current(), resource_dispatcher());
+ GetChannel()->AddFilter(resource_scheduling_filter_.get());
+ channel()->AddFilter(resource_scheduling_filter_.get());
+
bool enable = !command_line.HasSwitch(switches::kDisableThreadedCompositing);
if (enable) {
#if defined(OS_ANDROID)
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698