op: move Ops internal methods and state to internal package ops

Merge package opconsts into ops as well; it only existed to break
import cycles.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-10-04 15:44:48 +02:00
parent 936c266b03
commit 391725b9d0
18 changed files with 558 additions and 561 deletions
+2 -2
View File
@@ -761,14 +761,14 @@ func BenchmarkAreaOp_Decode(b *testing.B) {
ops := new(op.Ops)
pointer.Rect(image.Rectangle{Max: image.Pt(100, 100)}).Push(ops).Pop()
for i := 0; i < b.N; i++ {
benchAreaOp.Decode(ops.Data())
benchAreaOp.Decode(ops.Internal.Data())
}
}
func BenchmarkAreaOp_Hit(b *testing.B) {
ops := new(op.Ops)
pointer.Rect(image.Rectangle{Max: image.Pt(100, 100)}).Push(ops).Pop()
benchAreaOp.Decode(ops.Data())
benchAreaOp.Decode(ops.Internal.Data())
for i := 0; i < b.N; i++ {
benchAreaOp.Hit(f32.Pt(50, 50))
}