Index: chrome/browser/resources/tracing/timeline_track.js |
diff --git a/chrome/browser/resources/tracing/timeline_track.js b/chrome/browser/resources/tracing/timeline_track.js |
index 0d00b1e822c3630c3bd8a521c46e2fad0c9fe086..dd40608c195b5cc21f3c563200b67157f1d30acd 100644 |
--- a/chrome/browser/resources/tracing/timeline_track.js |
+++ b/chrome/browser/resources/tracing/timeline_track.js |
@@ -181,12 +181,18 @@ cr.define('tracing', function() { |
track.height = '4px'; |
} |
- for (var srI = 0; srI < this.thread_.nonNestedSubRows.length; ++srI) { |
- this.addTrack_(this.thread_.nonNestedSubRows[srI]); |
+ if (this.thread_.asyncSlices.length) { |
+ var subRows = this.thread_.asyncSlices.subRows; |
+ for (var srI = 0; srI < subRows.length; srI++) { |
+ var track = this.addTrack_(subRows[srI]); |
+ track.asyncStyle = true; |
+ } |
} |
- for (var srI = 0; srI < this.thread_.subRows.length; ++srI) { |
+ |
+ for (var srI = 0; srI < this.thread_.subRows.length; srI++) { |
this.addTrack_(this.thread_.subRows[srI]); |
} |
+ |
if (this.tracks_.length > 0) { |
if (this.thread_.cpuSlices) { |
this.tracks_[1].heading = this.heading_; |
@@ -443,6 +449,16 @@ cr.define('tracing', function() { |
decorate: function() { |
this.classList.add('timeline-slice-track'); |
this.elidedTitleCache = new ElidedTitleCache(); |
+ this.asyncStyle_ = false; |
+ }, |
+ |
+ get asyncStyle() { |
+ return this.asyncStyle_; |
+ }, |
+ |
+ set asyncStyle(v) { |
+ this.asyncStyle_ = !!v; |
+ this.invalidate(); |
}, |
get slices() { |
@@ -503,6 +519,8 @@ cr.define('tracing', function() { |
vp.applyTransformToCanavs(ctx); |
// Slices. |
+ if (this.asyncStyle_) |
+ ctx.globalAlpha = 0.25; |
var tr = new tracing.FastRectRenderer(ctx, viewLWorld, 2 * pixWidth, |
2 * pixWidth, viewRWorld, pallette); |
tr.setYandH(0, canvasH); |