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

Unified Diff: cc/resources/raster_worker_pool.cc

Issue 569733002: cc: Remove cc:RasterRequiredForActivation synthetic delays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: post-increment to pre-increment Created 6 years, 3 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/resources/pixel_buffer_raster_worker_pool.cc ('k') | cc/resources/raster_worker_pool_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/raster_worker_pool.cc
diff --git a/cc/resources/raster_worker_pool.cc b/cc/resources/raster_worker_pool.cc
index d175141f3f6308c688637857702b0ab9d9e10275..6cb6687e2a59920e93b9f7b7389ba6b6609cba01 100644
--- a/cc/resources/raster_worker_pool.cc
+++ b/cc/resources/raster_worker_pool.cc
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "base/debug/trace_event_synthetic_delay.h"
+#include "base/debug/trace_event.h"
#include "base/lazy_instance.h"
#include "base/strings/stringprintf.h"
#include "base/threading/simple_thread.h"
@@ -18,9 +18,7 @@ namespace {
class RasterTaskGraphRunner : public TaskGraphRunner,
public base::DelegateSimpleThread::Delegate {
public:
- RasterTaskGraphRunner()
- : synthetic_delay_(base::debug::TraceEventSyntheticDelay::Lookup(
- "cc.RasterRequiredForActivation")) {
+ RasterTaskGraphRunner() {
size_t num_threads = RasterWorkerPool::GetNumRasterThreads();
while (workers_.size() < num_threads) {
scoped_ptr<base::DelegateSimpleThread> worker =
@@ -39,10 +37,6 @@ class RasterTaskGraphRunner : public TaskGraphRunner,
virtual ~RasterTaskGraphRunner() { NOTREACHED(); }
- base::debug::TraceEventSyntheticDelay* synthetic_delay() {
- return synthetic_delay_;
- }
-
private:
// Overridden from base::DelegateSimpleThread::Delegate:
virtual void Run() OVERRIDE {
@@ -50,7 +44,6 @@ class RasterTaskGraphRunner : public TaskGraphRunner,
}
ScopedPtrDeque<base::DelegateSimpleThread> workers_;
- base::debug::TraceEventSyntheticDelay* synthetic_delay_;
};
base::LazyInstance<RasterTaskGraphRunner>::Leaky g_task_graph_runner =
@@ -93,43 +86,6 @@ class RasterFinishedTaskImpl : public RasterizerTask {
DISALLOW_COPY_AND_ASSIGN(RasterFinishedTaskImpl);
};
-class RasterRequiredForActivationFinishedTaskImpl
- : public RasterFinishedTaskImpl {
- public:
- RasterRequiredForActivationFinishedTaskImpl(
- base::SequencedTaskRunner* task_runner,
- const base::Closure& on_raster_finished_callback,
- size_t tasks_required_for_activation_count)
- : RasterFinishedTaskImpl(task_runner, on_raster_finished_callback),
- tasks_required_for_activation_count_(
- tasks_required_for_activation_count) {
- if (tasks_required_for_activation_count_) {
- g_task_graph_runner.Get().synthetic_delay()->BeginParallel(
- &activation_delay_end_time_);
- }
- }
-
- // Overridden from Task:
- virtual void RunOnWorkerThread() OVERRIDE {
- TRACE_EVENT0(
- "cc", "RasterRequiredForActivationFinishedTaskImpl::RunOnWorkerThread");
-
- if (tasks_required_for_activation_count_) {
- g_task_graph_runner.Get().synthetic_delay()->EndParallel(
- activation_delay_end_time_);
- }
- RasterFinished();
- }
-
- private:
- virtual ~RasterRequiredForActivationFinishedTaskImpl() {}
-
- base::TimeTicks activation_delay_end_time_;
- const size_t tasks_required_for_activation_count_;
-
- DISALLOW_COPY_AND_ASSIGN(RasterRequiredForActivationFinishedTaskImpl);
-};
-
} // namespace
// This allows an external rasterize on-demand system to run raster tasks
@@ -179,18 +135,6 @@ scoped_refptr<RasterizerTask> RasterWorkerPool::CreateRasterFinishedTask(
}
// static
-scoped_refptr<RasterizerTask>
-RasterWorkerPool::CreateRasterRequiredForActivationFinishedTask(
- size_t tasks_required_for_activation_count,
- base::SequencedTaskRunner* task_runner,
- const base::Closure& on_raster_finished_callback) {
- return make_scoped_refptr(new RasterRequiredForActivationFinishedTaskImpl(
- task_runner,
- on_raster_finished_callback,
- tasks_required_for_activation_count));
-}
-
-// static
void RasterWorkerPool::ScheduleTasksOnOriginThread(RasterizerTaskClient* client,
TaskGraph* graph) {
TRACE_EVENT0("cc", "Rasterizer::ScheduleTasksOnOriginThread");
« no previous file with comments | « cc/resources/pixel_buffer_raster_worker_pool.cc ('k') | cc/resources/raster_worker_pool_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698