@@ -215,6 +215,7 @@ TEST(InProgressStrokeTest, DefaultConstructed) {
215215EXPECT_TRUE (stroke.GetUpdatedRegion ().IsEmpty ());
216216EXPECT_TRUE (stroke.InputsAreFinished ());
217217EXPECT_FALSE (stroke.NeedsUpdate ());
218+ EXPECT_FALSE (stroke.ChangesWithTime ());
218219}
219220
220221TEST (InProgressStrokeTest, MoveConstructedAndAssigned) {
@@ -264,6 +265,7 @@ TEST(InProgressStrokeTest, StartAfterConstruction) {
264265EXPECT_TRUE (stroke.GetUpdatedRegion ().IsEmpty ());
265266EXPECT_FALSE (stroke.InputsAreFinished ());
266267EXPECT_FALSE (stroke.NeedsUpdate ());
268+ EXPECT_FALSE (stroke.ChangesWithTime ());
267269}
268270
269271TEST (InProgressStrokeTest, ClearAfterStart) {
@@ -278,6 +280,7 @@ TEST(InProgressStrokeTest, ClearAfterStart) {
278280EXPECT_TRUE (stroke.GetUpdatedRegion ().IsEmpty ());
279281EXPECT_TRUE (stroke.InputsAreFinished ());
280282EXPECT_FALSE (stroke.NeedsUpdate ());
283+ EXPECT_FALSE (stroke.ChangesWithTime ());
281284}
282285
283286TEST (InProgressStrokeTest, EnqueueInputsWithoutStart) {
@@ -308,6 +311,7 @@ TEST(InProgressStrokeTest, EmptyEnqueueInputsDoesNotNeedUpdate) {
308311EXPECT_EQ (absl::OkStatus (), stroke.EnqueueInputs ({}, {}));
309312
310313EXPECT_FALSE (stroke.NeedsUpdate ());
314+ EXPECT_FALSE (stroke.ChangesWithTime ());
311315}
312316
313317TEST (InProgressStrokeTest, NonEmptyEnqueueInputsNeedsUpdate) {
@@ -321,6 +325,7 @@ TEST(InProgressStrokeTest, NonEmptyEnqueueInputsNeedsUpdate) {
321325EXPECT_EQ (absl::OkStatus (), stroke.EnqueueInputs (*real_inputs, {}));
322326
323327EXPECT_TRUE (stroke.NeedsUpdate ());
328+ EXPECT_FALSE (stroke.ChangesWithTime ());
324329}
325330
326331TEST (InProgressStrokeTest, EmptyEnqueueInputsAndUpdateAfterStart) {
@@ -338,6 +343,7 @@ TEST(InProgressStrokeTest, EmptyEnqueueInputsAndUpdateAfterStart) {
338343EXPECT_THAT (stroke.GetCoatOutlines (0 ),IsEmpty ());
339344EXPECT_TRUE (stroke.GetUpdatedRegion ().IsEmpty ());
340345EXPECT_FALSE (stroke.NeedsUpdate ());
346+ EXPECT_FALSE (stroke.ChangesWithTime ());
341347}
342348
343349TEST (InProgressStrokeTest, EnqueueInputsPredictionOnlyAndUpdate) {
@@ -351,6 +357,7 @@ TEST(InProgressStrokeTest, EnqueueInputsPredictionOnlyAndUpdate) {
351357EXPECT_EQ (absl::OkStatus (), stroke.EnqueueInputs ({}, *predicted_inputs));
352358
353359EXPECT_TRUE (stroke.NeedsUpdate ());
360+ EXPECT_FALSE (stroke.ChangesWithTime ());
354361
355362EXPECT_EQ (absl::OkStatus (), stroke.UpdateShape (Duration32::Zero ()));
356363
@@ -359,6 +366,7 @@ TEST(InProgressStrokeTest, EnqueueInputsPredictionOnlyAndUpdate) {
359366EXPECT_GT (stroke.GetMesh (0 ).VertexCount (),0u );
360367EXPECT_FALSE (stroke.GetUpdatedRegion ().IsEmpty ());
361368EXPECT_FALSE (stroke.NeedsUpdate ());
369+ EXPECT_FALSE (stroke.ChangesWithTime ());
362370}
363371
364372TEST (InProgressStrokeTest, NonEmptyInputs) {
@@ -489,26 +497,31 @@ TEST(InProgressStrokeTest, EnqueueInputsWithDifferentToolTypes) {
489497EXPECT_THAT (stroke.EnqueueInputs (*mouse_input, *touch_input),
490498IsInvalidArgumentErrorThat (HasSubstr (" tool_type" )));
491499EXPECT_FALSE (stroke.NeedsUpdate ());// no inputs were enqueued
500+ EXPECT_FALSE (stroke.ChangesWithTime ());
492501
493502// We *can* predict touch inputs (with no real inputs so far)...
494503EXPECT_EQ (absl::OkStatus (), stroke.EnqueueInputs ({}, *touch_input));
495504EXPECT_TRUE (stroke.NeedsUpdate ());// inputs were enqueued
505+ EXPECT_FALSE (stroke.ChangesWithTime ());
496506EXPECT_EQ (absl::OkStatus (), stroke.UpdateShape (Duration32::Zero ()));
497507// ...and then actually end up with real mouse inputs (which replace the
498508// predicted touch inputs).
499509EXPECT_EQ (absl::OkStatus (), stroke.EnqueueInputs (*mouse_input, {}));
500510EXPECT_TRUE (stroke.NeedsUpdate ());// inputs were enqueued
511+ EXPECT_FALSE (stroke.ChangesWithTime ());
501512EXPECT_EQ (absl::OkStatus (), stroke.UpdateShape (Duration32::Zero ()));
502513
503514// But now that we have real mouse inputs, we can't predict further touch
504515// inputs...
505516EXPECT_THAT (stroke.EnqueueInputs ({}, *touch_input),
506517IsInvalidArgumentErrorThat (HasSubstr (" tool_type" )));
507518EXPECT_FALSE (stroke.NeedsUpdate ());// no inputs were enqueued
519+ EXPECT_FALSE (stroke.ChangesWithTime ());
508520// ...nor can we add real touch inputs.
509521EXPECT_THAT (stroke.EnqueueInputs (*touch_input, {}),
510522IsInvalidArgumentErrorThat (HasSubstr (" tool_type" )));
511523EXPECT_FALSE (stroke.NeedsUpdate ());// no inputs were enqueued
524+ EXPECT_FALSE (stroke.ChangesWithTime ());
512525}
513526
514527TEST (InProgressStrokeTest, EnqueueInputsDuplicatePositionAndTime) {
@@ -523,22 +536,27 @@ TEST(InProgressStrokeTest, EnqueueInputsDuplicatePositionAndTime) {
523536EXPECT_THAT (stroke.EnqueueInputs (*input, *input),
524537IsInvalidArgumentErrorThat (HasSubstr (" duplicate" )));
525538EXPECT_FALSE (stroke.NeedsUpdate ());// no inputs were enqueued
539+ EXPECT_FALSE (stroke.ChangesWithTime ());
526540
527541EXPECT_EQ (absl::OkStatus (), stroke.EnqueueInputs ({}, *input));
528542EXPECT_TRUE (stroke.NeedsUpdate ());// inputs were enqueued
543+ EXPECT_FALSE (stroke.ChangesWithTime ());
529544EXPECT_EQ (absl::OkStatus (), stroke.UpdateShape (Duration32::Seconds (1 )));
530545
531546EXPECT_EQ (absl::OkStatus (), stroke.EnqueueInputs (*input, {}));
532547EXPECT_TRUE (stroke.NeedsUpdate ());// inputs were enqueued
548+ EXPECT_FALSE (stroke.ChangesWithTime ());
533549EXPECT_EQ (absl::OkStatus (), stroke.UpdateShape (Duration32::Seconds (1 )));
534550
535551EXPECT_THAT (stroke.EnqueueInputs ({}, *input),
536552IsInvalidArgumentErrorThat (HasSubstr (" duplicate" )));
537553EXPECT_FALSE (stroke.NeedsUpdate ());// no inputs were enqueued
554+ EXPECT_FALSE (stroke.ChangesWithTime ());
538555
539556EXPECT_THAT (stroke.EnqueueInputs (*input, {}),
540557IsInvalidArgumentErrorThat (HasSubstr (" duplicate" )));
541558EXPECT_FALSE (stroke.NeedsUpdate ());// no inputs were enqueued
559+ EXPECT_FALSE (stroke.ChangesWithTime ());
542560}
543561
544562TEST (InProgressStrokeTest,
@@ -555,10 +573,12 @@ TEST(InProgressStrokeTest,
555573
556574EXPECT_EQ (absl::OkStatus (), stroke.EnqueueInputs (*first, {}));
557575EXPECT_TRUE (stroke.NeedsUpdate ());// inputs were enqueued
576+ EXPECT_FALSE (stroke.ChangesWithTime ());
558577EXPECT_EQ (absl::OkStatus (), stroke.UpdateShape (Duration32::Seconds (1 )));
559578
560579EXPECT_EQ (absl::OkStatus (), stroke.EnqueueInputs (*second, {}));
561580EXPECT_TRUE (stroke.NeedsUpdate ());// inputs were enqueued
581+ EXPECT_FALSE (stroke.ChangesWithTime ());
562582// But not actually doing an update yet. We reject updates that would
563583// duplicate against the last real input, which is currently queued.
564584EXPECT_THAT (stroke.EnqueueInputs (*second, {}),
@@ -591,25 +611,30 @@ TEST(InProgressStrokeTest, EnqueueInputsWithDecreasingElapsedTime) {
591611EXPECT_THAT (stroke.EnqueueInputs (*first_inputs, *second_inputs),
592612IsInvalidArgumentErrorThat (HasSubstr (" non-decreasing" )));
593613EXPECT_FALSE (stroke.NeedsUpdate ());// no inputs were enqueued
614+ EXPECT_FALSE (stroke.ChangesWithTime ());
594615
595616// We *can* enqueue just the prediction...
596617EXPECT_EQ (absl::OkStatus (), stroke.EnqueueInputs ({}, *second_inputs));
597618EXPECT_TRUE (stroke.NeedsUpdate ());// inputs were enqueued
619+ EXPECT_FALSE (stroke.ChangesWithTime ());
598620EXPECT_EQ (absl::OkStatus (), stroke.UpdateShape (Duration32::Seconds (3 )));
599621// ...and then later replace it with the real inputs.
600622EXPECT_EQ (absl::OkStatus (), stroke.EnqueueInputs (*first_inputs, {}));
601623EXPECT_TRUE (stroke.NeedsUpdate ());// inputs were enqueued
624+ EXPECT_FALSE (stroke.ChangesWithTime ());
602625EXPECT_EQ (absl::OkStatus (), stroke.UpdateShape (Duration32::Seconds (4 )));
603626
604627// But now that we've added the real inputs, we can't then add a prediction
605628// whose start time takes place in the middle of those real inputs...
606629EXPECT_THAT (stroke.EnqueueInputs ({}, *second_inputs),
607630IsInvalidArgumentErrorThat (HasSubstr (" non-decreasing" )));
608631EXPECT_FALSE (stroke.NeedsUpdate ());// no inputs were enqueued
632+ EXPECT_FALSE (stroke.ChangesWithTime ());
609633// ...nor can we add those overlapping inputs as additional real inputs.
610634EXPECT_THAT (stroke.EnqueueInputs (*second_inputs, {}),
611635IsInvalidArgumentErrorThat (HasSubstr (" non-decreasing" )));
612636EXPECT_FALSE (stroke.NeedsUpdate ());// no inputs were enqueued
637+ EXPECT_FALSE (stroke.ChangesWithTime ());
613638}
614639
615640TEST (InProgressStrokeTest, EnqueueInputsWithDifferentOptionalPropertyFormats) {
@@ -629,21 +654,25 @@ TEST(InProgressStrokeTest, EnqueueInputsWithDifferentOptionalPropertyFormats) {
629654EXPECT_THAT (stroke.EnqueueInputs (*pressure_input, *no_pressure_input),
630655IsInvalidArgumentErrorThat (HasSubstr (" pressure" )));
631656EXPECT_FALSE (stroke.NeedsUpdate ());// no inputs were enqueued
657+ EXPECT_FALSE (stroke.ChangesWithTime ());
632658
633659// Add some real inputs with pressure data.
634660EXPECT_EQ (absl::OkStatus (), stroke.EnqueueInputs (*pressure_input, {}));
635661EXPECT_TRUE (stroke.NeedsUpdate ());// inputs were enqueued
662+ EXPECT_FALSE (stroke.ChangesWithTime ());
636663EXPECT_EQ (absl::OkStatus (), stroke.UpdateShape (Duration32::Zero ()));
637664
638665// Now that we have real inputs with pressure data, we can't predict further
639666// inputs without pressure data...
640667EXPECT_THAT (stroke.EnqueueInputs ({}, *no_pressure_input),
641668IsInvalidArgumentErrorThat (HasSubstr (" pressure" )));
642669EXPECT_FALSE (stroke.NeedsUpdate ());// no inputs were enqueued
670+ EXPECT_FALSE (stroke.ChangesWithTime ());
643671// ...nor can we add further real inputs without pressure data.
644672EXPECT_THAT (stroke.EnqueueInputs (*no_pressure_input, {}),
645673IsInvalidArgumentErrorThat (HasSubstr (" pressure" )));
646674EXPECT_FALSE (stroke.NeedsUpdate ());// no inputs were enqueued
675+ EXPECT_FALSE (stroke.ChangesWithTime ());
647676}
648677
649678TEST (InProgressStrokeTest, UpdateShapeWithNegativeCurrentElapsedTime) {