mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 17:05:38 +00:00
op/paint: return ClipOp from Path.End
Instead of adding an implicit ClipOp, return a ClipOp ready to use, freeing the caller from recording a macro. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"gioui.org/op"
|
||||
"gioui.org/op/paint"
|
||||
)
|
||||
|
||||
func TestLayoutLRU(t *testing.T) {
|
||||
@@ -24,7 +24,7 @@ func TestLayoutLRU(t *testing.T) {
|
||||
func TestuPathLRU(t *testing.T) {
|
||||
c := new(pathCache)
|
||||
put := func(i int) {
|
||||
c.Put(pathKey{str: strconv.Itoa(i)}, op.MacroOp{})
|
||||
c.Put(pathKey{str: strconv.Itoa(i)}, paint.ClipOp{})
|
||||
}
|
||||
get := func(i int) bool {
|
||||
_, ok := c.Get(pathKey{str: strconv.Itoa(i)})
|
||||
|
||||
Reference in New Issue
Block a user