Update skia flush call APIs.

Test: manual
Change-Id: I72fa57b04f1b4ea594063ddb4ce6af9507b1fcdb
diff --git a/libs/hwui/pipeline/skia/SkiaPipeline.cpp b/libs/hwui/pipeline/skia/SkiaPipeline.cpp
index 5088494..89a1c71 100644
--- a/libs/hwui/pipeline/skia/SkiaPipeline.cpp
+++ b/libs/hwui/pipeline/skia/SkiaPipeline.cpp
@@ -145,7 +145,7 @@
         if (cachedContext.get() != currentContext) {
             if (cachedContext.get()) {
                 ATRACE_NAME("flush layers (context changed)");
-                cachedContext->flush();
+                cachedContext->flushAndSubmit();
             }
             cachedContext.reset(SkSafeRef(currentContext));
         }
@@ -153,7 +153,7 @@
 
     if (cachedContext.get()) {
         ATRACE_NAME("flush layers");
-        cachedContext->flush();
+        cachedContext->flushAndSubmit();
     }
 }
 
@@ -450,7 +450,7 @@
     }
 
     ATRACE_NAME("flush commands");
-    surface->getCanvas()->flush();
+    surface->flushAndSubmit();
 
     Properties::skpCaptureEnabled = previousSkpEnabled;
 }