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

Unified Diff: tracing/tracing/model/helpers/chrome_process_helper.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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 | « tracing/tracing/model/helpers/chrome_browser_helper.html ('k') | tracing/tracing/model/ir_coverage.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/helpers/chrome_process_helper.html
diff --git a/tracing/tracing/model/helpers/chrome_process_helper.html b/tracing/tracing/model/helpers/chrome_process_helper.html
index 147b3d7e09ca4cb5669dd33774e9a7a21f65377f..7c31f100451f1c2561e07a3cf6e67192a9798225 100644
--- a/tracing/tracing/model/helpers/chrome_process_helper.html
+++ b/tracing/tracing/model/helpers/chrome_process_helper.html
@@ -45,19 +45,14 @@ tr.exportTo('tr.model.helpers', function() {
},
getFrameEventsInRange: function(frametimeType, range) {
- var titleToGet;
- if (frametimeType == MAIN_FRAMETIME_TYPE)
- titleToGet = MAIN_RENDERING_STATS;
- else
- titleToGet = IMPL_RENDERING_STATS;
+ var titleToGet = (frametimeType === MAIN_FRAMETIME_TYPE ?
+ MAIN_RENDERING_STATS : IMPL_RENDERING_STATS);
var frameEvents = [];
- this.process.iterateAllEvents(function(event) {
- if (event.title !== titleToGet)
- return;
- if (range.intersectsExplicitRangeInclusive(event.start, event.end))
- frameEvents.push(event);
- });
+ for (var event of this.process.getDescendantEvents())
+ if (event.title === titleToGet)
+ if (range.intersectsExplicitRangeInclusive(event.start, event.end))
+ frameEvents.push(event);
frameEvents.sort(function(a, b) {return a.start - b.start});
return frameEvents;
« no previous file with comments | « tracing/tracing/model/helpers/chrome_browser_helper.html ('k') | tracing/tracing/model/ir_coverage.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698