forked fromgoogle/ink
- Notifications
You must be signed in to change notification settings - Fork0
Commit367bda7
Simplify sampling windows in input modeler
* For the stylus modeler, discard segments of the raw input polyline once the projection from the modeled stroke to that has passed a that portion, rather than keeping segments back to a minimum of time and number of points. The previous behavior could push forward the projection in a way that didn't make a whole lot of sense. It could prevent a degree of undesired backtracking, but the code has since been fixed to explicitly prevent the projection from backtracking along the input polyline.* For the loop contraction mitigation, determine the window of running average of speed only by duration, not by number of points. But the number of points is not equal to the number of raw inputs at that point, it's been upsampled according to `SamplingParams::min_output_rate`. So it's not actually a number of distinct raw `Input`s passed to `StrokeModeler::Update`. Instead, just use the duration-based window. If we end up needing a "min number of distinct points" as well, we can put that back, but should implement it correctly (i.e. it needs to count the actual number of raw input points before upsampling).* One very brittle test assertion is removed, and some other tests are updated.PiperOrigin-RevId: 7725921771 parentd6c7249 commit367bda7
File tree
3 files changed
+4
-77
lines changed- ink/strokes/internal
3 files changed
+4
-77
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | 95 | | |
98 | 96 | | |
99 | 97 | | |
| |||
108 | 106 | | |
109 | 107 | | |
110 | 108 | | |
111 | | - | |
112 | 109 | | |
113 | 110 | | |
114 | 111 | | |
| |||
125 | 122 | | |
126 | 123 | | |
127 | 124 | | |
128 | | - | |
129 | | - | |
130 | | - | |
| 125 | + | |
131 | 126 | | |
132 | 127 | | |
133 | 128 | | |
134 | 129 | | |
135 | | - | |
136 | | - | |
137 | | - | |
| 130 | + | |
138 | 131 | | |
139 | 132 | | |
140 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | 397 | | |
465 | 398 | | |
466 | 399 | | |
| |||
0 commit comments
Comments
(0)