Skip to content

Commit d88056b

Browse files
committed
perf(timeline): use correct render texture size on HiDPI screen
1 parent 7dc1d44 commit d88056b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/app-frontend/src/features/timeline/TimelineView.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ export default defineComponent({
178178
// Manual painting
179179
if (app.renderer.type === PIXI.RENDERER_TYPE.WEBGL) {
180180
mainRenderTexture = PIXI.RenderTexture.create({
181-
width: app.view.width,
182-
height: app.view.height,
181+
width: app.view.width / window.devicePixelRatio,
182+
height: app.view.height / window.devicePixelRatio,
183183
resolution: window.devicePixelRatio,
184184
})
185185
mainRenderTexture.framebuffer.multisample = PIXI.MSAA_QUALITY.LOW
@@ -1332,7 +1332,7 @@ export default defineComponent({
13321332
app.view.style.opacity = '0'
13331333
// @ts-expect-error PIXI type is missing queueResize
13341334
app.queueResize()
1335-
mainRenderTexture?.resize(app.view.width, app.view.height)
1335+
mainRenderTexture?.resize(app.view.width / window.devicePixelRatio, app.view.height / window.devicePixelRatio)
13361336
queueEventsUpdate()
13371337
drawLayerBackgroundEffects()
13381338
drawTimeCursor()

0 commit comments

Comments
 (0)