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

Side by Side Diff: cc/resources/image_raster_worker_pool.cc

Issue 83183005: Add synthetic delay points for latency testing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address David's comments. Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/resources/image_raster_worker_pool.h" 5 #include "cc/resources/image_raster_worker_pool.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "cc/debug/traced_value.h" 9 #include "cc/debug/traced_value.h"
10 #include "cc/resources/resource.h" 10 #include "cc/resources/resource.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 if (!raster_tasks_pending_) 78 if (!raster_tasks_pending_)
79 TRACE_EVENT_ASYNC_BEGIN0("cc", "ScheduledTasks", this); 79 TRACE_EVENT_ASYNC_BEGIN0("cc", "ScheduledTasks", this);
80 80
81 raster_tasks_pending_ = true; 81 raster_tasks_pending_ = true;
82 raster_tasks_required_for_activation_pending_ = true; 82 raster_tasks_required_for_activation_pending_ = true;
83 83
84 unsigned priority = 0u; 84 unsigned priority = 0u;
85 TaskGraph graph; 85 TaskGraph graph;
86 86
87 bool has_tasks_required_for_activation = false;
88 for (RasterTaskVector::const_iterator it = raster_tasks().begin();
89 it != raster_tasks().end();
90 ++it) {
91 if (IsRasterTaskRequiredForActivation(it->get())) {
92 has_tasks_required_for_activation = true;
93 break;
94 }
95 }
96
87 scoped_refptr<internal::WorkerPoolTask> 97 scoped_refptr<internal::WorkerPoolTask>
88 new_raster_required_for_activation_finished_task( 98 new_raster_required_for_activation_finished_task(
89 CreateRasterRequiredForActivationFinishedTask()); 99 CreateRasterRequiredForActivationFinishedTask(
100 has_tasks_required_for_activation));
reveman 2013/12/19 17:29:29 Can you use raster_tasks_required_for_activation()
90 internal::GraphNode* raster_required_for_activation_finished_node = 101 internal::GraphNode* raster_required_for_activation_finished_node =
91 CreateGraphNodeForTask( 102 CreateGraphNodeForTask(
92 new_raster_required_for_activation_finished_task.get(), 103 new_raster_required_for_activation_finished_task.get(),
93 priority++, 104 priority++,
94 &graph); 105 &graph);
95 106
96 scoped_refptr<internal::WorkerPoolTask> new_raster_finished_task( 107 scoped_refptr<internal::WorkerPoolTask> new_raster_finished_task(
97 CreateRasterFinishedTask()); 108 CreateRasterFinishedTask());
98 internal::GraphNode* raster_finished_node = 109 internal::GraphNode* raster_finished_node =
99 CreateGraphNodeForTask(new_raster_finished_task.get(), 110 CreateGraphNodeForTask(new_raster_finished_task.get(),
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 if (is_required_for_activation) { 237 if (is_required_for_activation) {
227 raster_required_for_activation_finished_node->add_dependency(); 238 raster_required_for_activation_finished_node->add_dependency();
228 image_node->add_dependent(raster_required_for_activation_finished_node); 239 image_node->add_dependent(raster_required_for_activation_finished_node);
229 } 240 }
230 241
231 raster_finished_node->add_dependency(); 242 raster_finished_node->add_dependency();
232 image_node->add_dependent(raster_finished_node); 243 image_node->add_dependent(raster_finished_node);
233 } 244 }
234 245
235 } // namespace cc 246 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/resources/pixel_buffer_raster_worker_pool.cc » ('j') | cc/resources/raster_worker_pool.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698