mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 938189 - Add telemetry for kicking off snapshot compression. r=felipe
This commit is contained in:
parent
9cca770bbd
commit
431a304374
@ -1042,18 +1042,23 @@ let gHistorySwipeAnimation = {
|
||||
return;
|
||||
}
|
||||
|
||||
let browser = gBrowser.selectedBrowser;
|
||||
let snapshots = browser.snapshots;
|
||||
let currIndex = browser.webNavigation.sessionHistory.index;
|
||||
TelemetryStopwatch.start("FX_GESTURE_COMPRESS_SNAPSHOT_OF_PAGE");
|
||||
try {
|
||||
let browser = gBrowser.selectedBrowser;
|
||||
let snapshots = browser.snapshots;
|
||||
let currIndex = browser.webNavigation.sessionHistory.index;
|
||||
|
||||
// Kick off snapshot compression.
|
||||
let canvas = snapshots[currIndex].image;
|
||||
canvas.toBlob(function(aBlob) {
|
||||
if (snapshots[currIndex]) {
|
||||
snapshots[currIndex].image = aBlob;
|
||||
}
|
||||
}, "image/png"
|
||||
);
|
||||
// Kick off snapshot compression.
|
||||
let canvas = snapshots[currIndex].image;
|
||||
canvas.toBlob(function(aBlob) {
|
||||
if (snapshots[currIndex]) {
|
||||
snapshots[currIndex].image = aBlob;
|
||||
}
|
||||
}, "image/png"
|
||||
);
|
||||
} finally {
|
||||
TelemetryStopwatch.finish("FX_GESTURE_COMPRESS_SNAPSHOT_OF_PAGE");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -2639,6 +2639,12 @@
|
||||
"n_buckets": "30",
|
||||
"description": "Firefox: Time taken to store the image capture of the page to a canvas, for reuse while swiping through history (ms)."
|
||||
},
|
||||
"FX_GESTURE_COMPRESS_SNAPSHOT_OF_PAGE": {
|
||||
"kind": "exponential",
|
||||
"high": "1000",
|
||||
"n_buckets": "30",
|
||||
"description": "Firefox: Time taken to kick off image compression of the canvas that will be used during swiping through history (ms)."
|
||||
},
|
||||
"FX_TAB_ANIM_OPEN_MS": {
|
||||
"kind": "exponential",
|
||||
"high": "3000",
|
||||
|
Loading…
Reference in New Issue
Block a user