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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/PerformanceModel.js

Issue 2852173002: DevTools: Show screenshots on the main flamechart (Closed)
Patch Set: addressing comments Created 3 years, 8 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
Index: third_party/WebKit/Source/devtools/front_end/timeline/PerformanceModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/PerformanceModel.js b/third_party/WebKit/Source/devtools/front_end/timeline/PerformanceModel.js
index f01d5b0254e4b5a639aa8769d53569fa7ac2782d..c1471f79ddc1a8a54d3572802583dc072b300839 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/PerformanceModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/PerformanceModel.js
@@ -133,6 +133,17 @@ Timeline.PerformanceModel = class extends Common.Object {
for (var extensionEntry of this._extensionTracingModels)
extensionEntry.model.reset();
}
+
+ /**
+ * @param {!TimelineModel.TimelineFrame} frame
+ * @return {?SDK.FilmStripModel.Frame}
+ */
+ filmStripModelFrame(frame) {
+ // For idle frames, look at the state at the beginning of the frame.
+ var screenshotTime = frame.idle ? frame.startTime : frame.endTime;
+ var filmStripFrame = this._filmStripModel.frameByTimestamp(screenshotTime);
+ return filmStripFrame && filmStripFrame.timestamp - frame.endTime < 10 ? filmStripFrame : null;
+ }
};
/**

Powered by Google App Engine
This is Rietveld 408576698