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

Side by Side Diff: Source/devtools/front_end/timeline/TimelineEventOverview.js

Issue 715803002: DevTools: merge TracingTimelineModel into TimelineModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 this._context.fillStyle = "rgba(0, 0, 0, 0.05)"; 79 this._context.fillStyle = "rgba(0, 0, 0, 0.05)";
80 for (var i = 1; i < WebInspector.TimelineEventOverview._numberOfStrips; i += 2) 80 for (var i = 1; i < WebInspector.TimelineEventOverview._numberOfStrips; i += 2)
81 this._context.fillRect(0.5, i * stripHeight + 0.5, this._canvas.widt h, stripHeight); 81 this._context.fillRect(0.5, i * stripHeight + 0.5, this._canvas.widt h, stripHeight);
82 82
83 /** 83 /**
84 * @param {!WebInspector.TimelineModel.Record} record 84 * @param {!WebInspector.TimelineModel.Record} record
85 * @this {WebInspector.TimelineEventOverview} 85 * @this {WebInspector.TimelineEventOverview}
86 */ 86 */
87 function appendRecord(record) 87 function appendRecord(record)
88 { 88 {
89 if (record.type() === WebInspector.TracingTimelineModel.RecordType.B eginFrame) 89 if (record.type() === WebInspector.TimelineModel.RecordType.BeginFra me)
90 return; 90 return;
91 var recordStart = Math.floor((record.startTime() - timeOffset) * sca le); 91 var recordStart = Math.floor((record.startTime() - timeOffset) * sca le);
92 var recordEnd = Math.ceil((record.endTime() - timeOffset) * scale); 92 var recordEnd = Math.ceil((record.endTime() - timeOffset) * scale);
93 var category = WebInspector.TimelineUIUtils.categoryForRecord(record ); 93 var category = WebInspector.TimelineUIUtils.categoryForRecord(record );
94 if (category.overviewStripGroupIndex < 0) 94 if (category.overviewStripGroupIndex < 0)
95 return; 95 return;
96 var bar = lastBarByGroup[category.overviewStripGroupIndex]; 96 var bar = lastBarByGroup[category.overviewStripGroupIndex];
97 // This bar may be merged with previous -- so just adjust the previo us bar. 97 // This bar may be merged with previous -- so just adjust the previo us bar.
98 if (bar) { 98 if (bar) {
99 // If record fits entirely into previous bar just absorb it igno ring the category match. 99 // If record fits entirely into previous bar just absorb it igno ring the category match.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 this._context.moveTo(0, 0); 144 this._context.moveTo(0, 0);
145 this._context.lineTo(width, 0); 145 this._context.lineTo(width, 0);
146 this._context.moveTo(0, WebInspector.TimelineEventOverview._stripGradien tHeight); 146 this._context.moveTo(0, WebInspector.TimelineEventOverview._stripGradien tHeight);
147 this._context.lineTo(width, WebInspector.TimelineEventOverview._stripGra dientHeight); 147 this._context.lineTo(width, WebInspector.TimelineEventOverview._stripGra dientHeight);
148 this._context.stroke(); 148 this._context.stroke();
149 this._context.restore(); 149 this._context.restore();
150 }, 150 },
151 151
152 __proto__: WebInspector.TimelineOverviewBase.prototype 152 __proto__: WebInspector.TimelineOverviewBase.prototype
153 } 153 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698