| OLD | NEW |
| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 */ | 331 */ |
| 332 function onEventEnd(e) | 332 function onEventEnd(e) |
| 333 { | 333 { |
| 334 quantizer.appendInterval(e.endTime, categoryIndexStack.pop()); | 334 quantizer.appendInterval(e.endTime, categoryIndexStack.pop()); |
| 335 } | 335 } |
| 336 | 336 |
| 337 WebInspector.TimelineModel.forEachEvent(events, onEventStart, onEven
tEnd); | 337 WebInspector.TimelineModel.forEachEvent(events, onEventStart, onEven
tEnd); |
| 338 quantizer.appendInterval(timeOffset + timeSpan + quantTime, idleInde
x); // Kick drawing the last bucket. | 338 quantizer.appendInterval(timeOffset + timeSpan + quantTime, idleInde
x); // Kick drawing the last bucket. |
| 339 for (var i = categoryOrder.length - 1; i > 0; --i) { | 339 for (var i = categoryOrder.length - 1; i > 0; --i) { |
| 340 paths[i].lineTo(width, height); | 340 paths[i].lineTo(width, height); |
| 341 ctx.fillStyle = categories[categoryOrder[i]].fillColorStop1; | 341 ctx.fillStyle = categories[categoryOrder[i]].color; |
| 342 ctx.fill(paths[i]); | 342 ctx.fill(paths[i]); |
| 343 } | 343 } |
| 344 } | 344 } |
| 345 | 345 |
| 346 /** | 346 /** |
| 347 * @param {!CanvasRenderingContext2D} ctx | 347 * @param {!CanvasRenderingContext2D} ctx |
| 348 */ | 348 */ |
| 349 function applyPattern(ctx) | 349 function applyPattern(ctx) |
| 350 { | 350 { |
| 351 var step = 4 * window.devicePixelRatio; | 351 var step = 4 * window.devicePixelRatio; |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 counters[group] = this._quantDuration; | 829 counters[group] = this._quantDuration; |
| 830 this._callback(counters); | 830 this._callback(counters); |
| 831 interval -= this._quantDuration; | 831 interval -= this._quantDuration; |
| 832 } | 832 } |
| 833 this._counters = []; | 833 this._counters = []; |
| 834 this._counters[group] = interval; | 834 this._counters[group] = interval; |
| 835 this._lastTime = time; | 835 this._lastTime = time; |
| 836 this._remainder = this._quantDuration - interval; | 836 this._remainder = this._quantDuration - interval; |
| 837 } | 837 } |
| 838 } | 838 } |
| OLD | NEW |