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

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

Issue 2486853002: Timeline: remove TimelineModel inferred properties from TracingModel.Event (Closed)
Patch Set: addressed comments and rebased Created 4 years, 1 month 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/TimelinePaintProfilerView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePaintProfilerView.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePaintProfilerView.js
index 95871301eec5e492fab10a6443b7709228fe1ad5..148752bc3cec7b4380f892d3944872512fb2fba5 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePaintProfilerView.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePaintProfilerView.js
@@ -63,7 +63,7 @@ WebInspector.TimelinePaintProfilerView = class extends WebInspector.SplitWidget
this._updateWhenVisible();
if (this._event.name === WebInspector.TimelineModel.RecordType.Paint)
- return !!event.picture;
+ return !!WebInspector.TimelineData.forEvent(event).picture;
if (this._event.name === WebInspector.TimelineModel.RecordType.RasterTask)
return this._frameModel.hasRasterTile(this._event);
return false;
@@ -84,7 +84,8 @@ WebInspector.TimelinePaintProfilerView = class extends WebInspector.SplitWidget
if (this._pendingSnapshot)
snapshotPromise = Promise.resolve({rect: null, snapshot: this._pendingSnapshot});
else if (this._event.name === WebInspector.TimelineModel.RecordType.Paint) {
- snapshotPromise = this._event.picture.objectPromise()
+ var picture = WebInspector.TimelineData.forEvent(this._event).picture;
+ snapshotPromise = picture.objectPromise()
.then(data => WebInspector.PaintProfilerSnapshot.load(this._target, data['skp64']))
.then(snapshot => snapshot && {rect: null, snapshot: snapshot});
} else if (this._event.name === WebInspector.TimelineModel.RecordType.RasterTask) {

Powered by Google App Engine
This is Rietveld 408576698