这是indexloc提供的服务,不要输入任何密码
Skip to content

What happens in configureSwapChain and on canvas resize? #1691

@kainino0x

Description

@kainino0x

We need to figure out what the semantics are of the following cases:

swapChain = ctx.configureSwapChain(...);
const t1 = swapChain.getCurrentTexture();
swapChain = ctx.configureSwapChain(...); // Is t1 destroyed?
const t2 = swapChain.getCurrentTexture(); // Same texture? New texture?
canvas.width++;
const t1 = swapChain.getCurrentTexture();
canvas.width++; // Is t1 destroyed? Or do we continue on pretending the canvas hasn't changed size?
const t2 = swapChain.getCurrentTexture(); // Same texture? New texture?
swapChain = ctx.configureSwapChain(...);
canvas.width++; // Is swapChain destroyed?

Somewhat related to #1548

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions