gpu: cache transformed bounds

To avoid duplicate work when using macros and non-offset transforms,
cache also the new bounding boxes set up for them. The ops.Reader
already generates Keys for all operations, so use them in the cache.

Signed-off-by: Viktor <viktor.ogeman@gmail.com>
This commit is contained in:
Viktor
2020-06-20 23:29:58 +02:00
committed by Elias Naur
parent 062cb210ea
commit 818d0c4af1
2 changed files with 9 additions and 19 deletions
-4
View File
@@ -54,10 +54,6 @@ type opMacroDef struct {
endpc pc
}
func (r *Reader) NewKey(pc int) Key {
return Key{ops: r.ops, pc: pc, version: r.ops.Version()}
}
// Reset start reading from the op list.
func (r *Reader) Reset(ops *op.Ops) {
r.stack = r.stack[:0]