Reland "Implement submit API to GrContext."

This reverts commit 9ee15d7b57075e2f8a533cfc9516aff0611a0ef3.

Reason for revert: relanding with fixes

Original change's description:
> Revert "Implement submit API to GrContext."
> 
> This reverts commit 40f288c72e4e836a2316cc058b5bb3aea92bde3f.
> 
> Reason for revert: canvaskit breaking for some reason???
> 
> Original change's description:
> > Implement submit API to GrContext.
> > 
> > Change-Id: Ib813d42abb5f63e2ecdbf245d416658143853288
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289033
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com,penghuang@chromium.org,vasilyt@chromium.org
> 
> Change-Id: Iee6c8342cccc601edf64ea011f1303e5d72559a9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290917
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,penghuang@chromium.org,vasilyt@chromium.org

# Not skipping CQ checks because this is a reland.

Change-Id: I5203676f88893cbbaba685301b8a713b40396b48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290960
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 2502d08..badb958 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -570,12 +570,7 @@
 
     SkDEBUGCODE(this->validate());
 
-    bool submitted = false;
-    if (didFlush) {
-        submitted = this->submitToGpu(SkToBool(info.fFlags & kSyncCpu_GrFlushFlag));
-    }
-
-    if (!submitted || (!direct->priv().caps()->semaphoreSupport() && info.fNumSemaphores)) {
+    if (!didFlush || (!direct->priv().caps()->semaphoreSupport() && info.fNumSemaphores)) {
         return GrSemaphoresSubmitted::kNo;
     }
     return GrSemaphoresSubmitted::kYes;