Remove SkCanvas::flush() call from skottielib

Follow-up to https://skia-review.googlesource.com/c/skia/+/716476

Change-Id: I4c67a667f3187d1c108608efa9cdf8df3cf55b3e
Bug: skia:14317
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/723413
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
diff --git a/platform_tools/android/apps/skottie/skottielib/src/main/cpp/native-lib.cpp b/platform_tools/android/apps/skottie/skottielib/src/main/cpp/native-lib.cpp
index df12675..d8d05f7 100644
--- a/platform_tools/android/apps/skottie/skottielib/src/main/cpp/native-lib.cpp
+++ b/platform_tools/android/apps/skottie/skottielib/src/main/cpp/native-lib.cpp
@@ -247,8 +247,7 @@
     SkAutoCanvasRestore acr(canvas, true);
     SkRect bounds = SkRect::MakeWH(width, height);
     skottieAnimation->mAnimation->render(canvas, &bounds);
-
-    canvas->flush();
+    dContext->flushAndSubmit();
     return true;
 }