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

Unified Diff: Source/devtools/front_end/TimelineOverviewPane.js

Issue 20066005: DevTools: [Timeline] Reset Memory Overview pane when clear button is clicked (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove redundant _clear Created 7 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/TimelineOverviewPane.js
diff --git a/Source/devtools/front_end/TimelineOverviewPane.js b/Source/devtools/front_end/TimelineOverviewPane.js
index 40d9a6b04dc76e611789909866539231038edf7d..51e3208bb444156a27c25d1d9b9b87ce74101a08 100644
--- a/Source/devtools/front_end/TimelineOverviewPane.js
+++ b/Source/devtools/front_end/TimelineOverviewPane.js
@@ -463,12 +463,12 @@ WebInspector.TimelineMemoryOverview = function(model)
WebInspector.TimelineMemoryOverview.prototype = {
update: function()
{
+ this._resetCanvas();
+
var records = this._model.records;
if (!records.length)
return;
- this._resetCanvas();
-
const lowerOffset = 3;
var maxUsedHeapSize = 0;
var minUsedHeapSize = 100000000000;
@@ -494,13 +494,11 @@ WebInspector.TimelineMemoryOverview.prototype = {
histogram[x] = Math.max(histogram[x] || 0, y);
});
- var ctx = this._context;
- this._clear(ctx);
-
height++; // +1 so that the border always fit into the canvas area.
var y = 0;
var isFirstPoint = true;
+ var ctx = this._context;
ctx.beginPath();
ctx.moveTo(0, this._canvas.height);
for (var x = 0; x < histogram.length; x++) {
@@ -531,12 +529,6 @@ WebInspector.TimelineMemoryOverview.prototype = {
this._minHeapSizeLabel.textContent = Number.bytesToString(minUsedHeapSize);
},
- _clear: function(ctx)
- {
- ctx.fillStyle = "rgba(255,255,255,0.8)";
- ctx.fillRect(0, 0, this._canvas.width, this._canvas.height);
- },
-
__proto__: WebInspector.TimelineOverviewBase.prototype
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698