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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2810883002: [scheduler] Remove webthread_impl_for_worker_scheduler from public API. (Closed)
Patch Set: Add TODO to remove WebThreadBase from public API Created 3 years, 8 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
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index d1c054fd660fba30207b8fbc506ef4c871792628..6c478d38a81d4348994fe085ac90c5ea0902f634 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -156,7 +156,7 @@
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebThread.h"
#include "third_party/WebKit/public/platform/scheduler/child/compositor_worker_scheduler.h"
-#include "third_party/WebKit/public/platform/scheduler/child/webthread_impl_for_worker_scheduler.h"
+#include "third_party/WebKit/public/platform/scheduler/child/webthread_base.h"
#include "third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h"
#include "third_party/WebKit/public/web/WebDatabase.h"
#include "third_party/WebKit/public/web/WebDocument.h"
@@ -226,7 +226,6 @@ using blink::WebScriptController;
using blink::WebSecurityPolicy;
using blink::WebString;
using blink::WebView;
-using blink::scheduler::WebThreadImplForWorkerScheduler;
namespace content {
@@ -290,25 +289,6 @@ static_assert(
blink::kWebMemoryPressureLevelCritical,
"blink::WebMemoryPressureLevelCritical not align");
-class WebThreadForCompositor : public WebThreadImplForWorkerScheduler {
- public:
- explicit WebThreadForCompositor(base::Thread::Options options)
- : WebThreadImplForWorkerScheduler("Compositor", options) {
- Init();
- }
- ~WebThreadForCompositor() override {}
-
- private:
- // WebThreadImplForWorkerScheduler:
- std::unique_ptr<blink::scheduler::WorkerScheduler> CreateWorkerScheduler()
- override {
- return base::MakeUnique<blink::scheduler::CompositorWorkerScheduler>(
- GetThread());
- }
-
- DISALLOW_COPY_AND_ASSIGN(WebThreadForCompositor);
-};
-
void* CreateHistogram(
const char *name, int min, int max, size_t buckets) {
if (min <= 0)
@@ -1087,7 +1067,8 @@ void RenderThreadImpl::InitializeCompositorThread() {
#if defined(OS_ANDROID)
options.priority = base::ThreadPriority::DISPLAY;
#endif
- compositor_thread_.reset(new WebThreadForCompositor(options));
+ compositor_thread_ =
+ blink::scheduler::WebThreadBase::CreateCompositorThread(options);
blink_platform_impl_->SetCompositorThread(compositor_thread_.get());
compositor_task_runner_ = compositor_thread_->GetTaskRunner();
compositor_task_runner_->PostTask(
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | third_party/WebKit/Source/platform/scheduler/child/webthread_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698