mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #18061 from Snuffleupagus/api-report-Stats
Slightly re-factor how the viewer initializes debug-only functionality
This commit is contained in:
commit
0347e59b99
2 changed files with 30 additions and 40 deletions
|
@ -1510,8 +1510,14 @@ class PDFPageProxy {
|
|||
internalRenderTask.capability.resolve();
|
||||
}
|
||||
|
||||
this._stats?.timeEnd("Rendering");
|
||||
this._stats?.timeEnd("Overall");
|
||||
if (this._stats) {
|
||||
this._stats.timeEnd("Rendering");
|
||||
this._stats.timeEnd("Overall");
|
||||
|
||||
if (globalThis.Stats?.enabled) {
|
||||
globalThis.Stats.add(this.pageNumber, this._stats);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const internalRenderTask = new InternalRenderTask({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue