Commit Graph

14 Commits

Author SHA1 Message Date
Seebs f68301dcd8 don't call Len() when it can't change
updateData()'s loops checking gt.Len() turns out to have been costing
significant computation, not least because each call then in turn
called gt.vs.Stride().
2017-06-10 10:47:18 -05:00
faiface 1fd110ce4c optimize GLTriangles SetLen and Update 2017-06-10 01:10:59 +02:00
Seebs ce8687b80f Don't duplicate computations in gltriangles.go
The computation including a call to Stride() can't be optimized away
safely because the compiler can't tell that Stride() is effectively
constant, but we know it won't change so we can make a slice pointing
at that part of the array.

CPU time for updateData goes from 26.35% to 18.65% in my test case.
2017-06-09 10:37:47 -05:00
faiface fcfeb200b6 replace complex128 Vec with a struct 2017-05-21 19:25:06 +02:00
faiface bce553aeec remove accidentaly kept updateLock field from GLTriangles 2017-04-12 11:25:11 +02:00
faiface 41e5e8ca77 fix race condition in GLTriangles 2017-04-11 15:02:58 +02:00
faiface f4916a4272 replace NRGBA to RGBA because Porter-Duff (!!!) 2017-04-09 22:00:26 +02:00
faiface eab91b4110 fix many bugs in pixelgl doc 2017-03-15 22:55:43 +01:00
faiface 000a18e2cf fix GLTriangles.SetLen when decreasing length 2017-03-09 22:56:46 +01:00
faiface a1e7f9bf04 better error messages %T -> (%T) 2017-03-08 23:51:53 +01:00
faiface 69a3c17cfc big big commit - rework whole pixelgl 2017-03-06 00:28:52 +01:00
faiface f7a52854c6 adapt GLTriangles (+ make them exported) 2017-02-24 19:30:06 +01:00
faiface c1843b8608 add Drawer struct 2017-02-23 13:07:40 +01:00
faiface dbd90a0bcb move OpenGL specific stuff to pixelgl (except for Picture) 2017-02-22 20:44:38 +01:00