Commit Graph

57 Commits

Author SHA1 Message Date
Hajime Hoshi
c36d4678a3 mipmap: Bug fix: DrawTriangles with a scale-only color matrix should be optimized
Fixes #1101
2020-03-17 02:48:29 +09:00
corfe83
b3c567de89
Fix another ~300 allocations per frame in my test project (#1089)
This simple change brings my simple test project from 752 allocations per frame to 474 allocations per frame. It seems a shame that go's escape analysis is not smart enough to leave this variable on the stack.

GeoM is a 24-byte struct and there is a slight perf difference that we are storing it in stack, but also copying it around with this change (instead of an 8-byte pointer). This could make things faster (due to stack / CPU cache) or slower (due to copying more memory) - when I try a stress test (drawing 100K images per frame), I can't see any actual performance difference (but I do see 100K fewer allocations, and GC is no longer running almost all the time).
2020-02-22 13:40:17 +09:00
Hajime Hoshi
46601bb516 graphics: Fill the screenshot in black when the screen is not transparent
Fixes #997
2020-02-06 03:08:16 +09:00
Hajime Hoshi
b3bdf51905
graphicscommand: Return the error immediately (#1060)
Now grpahicscommand saves the error and shows the error after a
while. This was good to simplify the API but was the cause to hide
some issues.

This change fixes all the errors to be returned immediately, and
buffer this in the ebiten package instead.

Fixes #971
2020-01-19 01:18:56 +09:00
Hajime Hoshi
2cbd5aa16e mipmap: Remove unused members 2020-01-08 02:32:28 +09:00
Hajime Hoshi
4c8137ccf5 mipmap: Bug fix: Use more negative mipmaps when float precision is low
Fixes #1044
2020-01-08 02:06:36 +09:00
Hajime Hoshi
c99fd1a742 mipmap: Create mipmap package and bufferd.Image uses it
Mipmap calculation must be executed after the main loop starts
because the graphics driver's HasHighPrecisionFloat is needed.
Then, operations on mipmap images must be called from images in
buffered package.

Updates #1044
2020-01-08 02:06:01 +09:00