graphics: Bug fix: revert viewport size for Edge

This commit is contained in:
Hajime Hoshi 2017-12-05 03:13:40 +09:00
parent f74c1e67ea
commit 264ca49a43

View File

@ -409,8 +409,9 @@ func (c *newScreenFramebufferImageCommand) Exec(indexOffsetInBytes int) error {
if c.height < 1 { if c.height < 1 {
return errors.New("graphics: height must be equal or more than 1.") return errors.New("graphics: height must be equal or more than 1.")
} }
w := emath.NextPowerOf2Int(c.width) // The (default) framebuffer size can't be converted to a power of 2.
h := emath.NextPowerOf2Int(c.height) // On browsers, c.width and c.height are used as viewport size and
c.result.framebuffer = newScreenFramebuffer(w, h, c.offsetX, c.offsetY) // Edge can't treat a bigger viewport than the drawing area (#71).
c.result.framebuffer = newScreenFramebuffer(c.width, c.height, c.offsetX, c.offsetY)
return nil return nil
} }