       ctx.save();
                ctx.font = '14px sans-serif';
                const lines = [
                    `FPS: ${currentFps.toFixed(1)}`,
                    `AVG FPS: ${avgFps.toFixed(1)}`,
                    `CURRENT FRAME: ${frameCount + 1}/${MAX_FRAME}`
                ];

                // 计算背景尺寸
                let maxWidth = 0;
                for (const line of lines) {
                    const width = ctx.measureText(line).width;
                    if (width > maxWidth) 