text: convert clip.Ops to op.CallOp

MacroOp is about to lose the ability to run a different operation list
than the one it was recorded on. Text shape caches rely on that property,
and must use the new CallOp operation added for purpose.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-12-11 22:58:08 +01:00
parent 06217c5320
commit 0768fbe590
6 changed files with 18 additions and 18 deletions
+2 -2
View File
@@ -3,7 +3,7 @@
package text
import (
"gioui.org/op/clip"
"gioui.org/op"
"gioui.org/unit"
"golang.org/x/image/font"
"golang.org/x/image/math/fixed"
@@ -60,7 +60,7 @@ type Font struct {
// Face implements text layout and shaping for a particular font.
type Face interface {
Layout(ppem fixed.Int26_6, str string, opts LayoutOptions) *Layout
Shape(ppem fixed.Int26_6, str String) clip.Op
Shape(ppem fixed.Int26_6, str String) op.CallOp
Metrics(ppem fixed.Int26_6) font.Metrics
}