font/opentype,text,widget: use clip.Op for text shapes, not a macro

This change avoids a macro wrapping every text shape, and prepares text
shaping for scoped clip operations.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-10-02 18:11:31 +02:00
parent cd5a78f3d8
commit c1298cd755
7 changed files with 26 additions and 29 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import (
"strconv"
"testing"
"gioui.org/op"
"gioui.org/op/clip"
)
func TestLayoutLRU(t *testing.T) {
@@ -24,7 +24,7 @@ func TestLayoutLRU(t *testing.T) {
func TestPathLRU(t *testing.T) {
c := new(pathCache)
put := func(i int) {
c.Put(pathKey{str: strconv.Itoa(i)}, op.CallOp{})
c.Put(pathKey{str: strconv.Itoa(i)}, clip.Op{})
}
get := func(i int) bool {
_, ok := c.Get(pathKey{str: strconv.Itoa(i)})