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

Unified Diff: components/mus/gles2/raster_thread_helper.cc

Issue 1449133002: TaskGraphRunner refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 5 years, 1 month 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: components/mus/gles2/raster_thread_helper.cc
diff --git a/components/mus/gles2/raster_thread_helper.cc b/components/mus/gles2/raster_thread_helper.cc
index dbd5696ab59673af43eaa71709561cb1438ddbab..93e37405e789f4f0dd6a3baf0237d0edae96a5b7 100644
--- a/components/mus/gles2/raster_thread_helper.cc
+++ b/components/mus/gles2/raster_thread_helper.cc
@@ -6,34 +6,22 @@
#include "base/logging.h"
#include "base/threading/simple_thread.h"
-#include "cc/raster/task_graph_runner.h"
+#include "cc/raster/single_thread_task_graph_runner.h"
namespace gles2 {
-class RasterThreadHelper::RasterThread : public base::SimpleThread {
- public:
- RasterThread(cc::TaskGraphRunner* task_graph_runner)
- : base::SimpleThread("CompositorTileWorker1"),
- task_graph_runner_(task_graph_runner) {}
-
- // Overridden from base::SimpleThread:
- void Run() override { task_graph_runner_->Run(); }
-
- private:
- cc::TaskGraphRunner* task_graph_runner_;
-
- DISALLOW_COPY_AND_ASSIGN(RasterThread);
-};
-
RasterThreadHelper::RasterThreadHelper()
- : task_graph_runner_(new cc::TaskGraphRunner),
- raster_thread_(new RasterThread(task_graph_runner_.get())) {
- raster_thread_->Start();
+ : task_graph_runner_(new cc::SingleThreadTaskGraphRunner) {
+ task_graph_runner_->Start("CompositorTileWorker1",
+ base::SimpleThread::Options());
}
RasterThreadHelper::~RasterThreadHelper() {
task_graph_runner_->Shutdown();
- raster_thread_->Join();
+}
+
+cc::TaskGraphRunner* RasterThreadHelper::task_graph_runner() {
+ return task_graph_runner_.get();
}
} // namespace gles2
« no previous file with comments | « components/mus/gles2/raster_thread_helper.h ('k') | content/browser/compositor/gpu_process_transport_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698