1df655a427
This reverts commit5fe4b6faeb
. Reason for revert: relanding with guards Original change's description: > Revert "[skottie] Fix text-on-path tracking" > > This reverts commitca973cbea0
. > > Reason for revert: g3 image diffs > > Original change's description: > > [skottie] Fix text-on-path tracking > > > > Tracking and line spacing computations require knowledge of cumulative > > values for the whole line => we need two passes: > > > > 1) compute cumulative values > > 2) compute per-fragment position adjustments > > > > Currently, #1 is implemented in the main onSync() loop (as we iterate > > to compute fragment props) and #2 is post-applied via adjustLineProps(), > > after the main loop. > > > > The problem is adjustLineProps() is executed after positioning glyphs on > > path, and tracking is not taken into account for path positioning > > (instead it moves glyphs horizontally, unrelated to the path). > > > > To fix this, we need tracking adjustments to be applied before > > positioning on path (which is performed in fragmentMatrix()). > > > > - move the cumulative tracking computation to a dedicate lambda > > (compute_linewide_props) > > - move the fragment position adjustments to the main onSync() loop > > (that way they participate in path positioning) > > - to avoid executing the first pass unnecessarily, add flags to detect > > the presence of tracking and line spacing animators. > > > > > > Change-Id: Ieef2afb53ffe14177eba0ef41dc5c71149cab070 > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518696 > > Reviewed-by: Ben Wagner <bungeman@google.com> > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > Commit-Queue: Florin Malita <fmalita@google.com> > > Change-Id: Ia99fbb3d7d98eb6a59ff00d796bcc05bc6db63a3 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/519597 > Auto-Submit: Florin Malita <fmalita@google.com> > Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Change-Id: Ia39602178099d7fa016997f02e1bdf705b16bb2e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/519598 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Florin Malita <fmalita@google.com>
1 line
2.4 KiB
JSON
1 line
2.4 KiB
JSON
{"v":"5.8.3","fr":60,"ip":0,"op":301,"w":500,"h":500,"nm":"tpath tracking","ddd":0,"assets":[],"fonts":{"list":[{"origin":0,"fPath":"","fClass":"","fFamily":"Google Sans","fWeight":"","fStyle":"Bold","fName":"GoogleSans-Bold","ascent":75.6476929411292}]},"layers":[{"ddd":0,"ind":1,"ty":5,"nm":"Foo Bar Baz","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"hasMask":true,"masksProperties":[{"inv":false,"mode":"n","pt":{"a":0,"k":{"i":[[66.274,0],[0,-66.274],[-66.274,0],[0,66.274]],"o":[[-66.274,0],[0,66.274],[66.274,0],[0,-66.274]],"v":[[0,-120],[-120,0],[0,120],[120,0]],"c":true},"ix":1},"o":{"a":0,"k":100,"ix":3},"x":{"a":0,"k":0,"ix":4},"nm":"Mask 1"}],"t":{"d":{"k":[{"s":{"s":72,"f":"GoogleSans-Bold","t":"Foo Bar Baz","ca":0,"j":2,"tr":0,"lh":96,"ls":0,"fc":[0,0.522,0]},"t":0}]},"p":{"m":0,"f":{"a":0,"k":377,"ix":5},"l":{"a":0,"k":0,"ix":6},"a":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":1,"ix":3},"r":{"a":0,"k":1,"ix":2}},"m":{"g":1,"a":{"a":0,"k":[0,0],"ix":2}},"a":[{"nm":"Animator 1","s":{"t":0,"xe":{"a":0,"k":0,"ix":7},"ne":{"a":0,"k":0,"ix":8},"a":{"a":0,"k":100,"ix":4},"b":1,"rn":0,"sh":1,"sm":{"a":0,"k":100,"ix":6},"r":1},"a":{"t":{"a":1,"k":[{"i":{"x":[0.336],"y":[0.999]},"o":{"x":[0.669],"y":[0.001]},"t":0,"s":[-35]},{"i":{"x":[0.336],"y":[0.997]},"o":{"x":[0.665],"y":[-0.001]},"t":150,"s":[50]},{"t":300,"s":[-35]}],"ix":89}}}]},"ip":0,"op":301,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":0,"k":[240,240],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,0,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":5,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false}],"ip":0,"op":301,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":1,"nm":"Medium Yellow Solid 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2,"l":2},"a":{"a":0,"k":[600,600,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"sw":1200,"sh":1200,"sc":"#ffffbd","ip":0,"op":301,"st":0,"bm":0}],"markers":[]} |