Split Ganesh-specific parts of SkiaVkRenderEngine into subclass

Similarly to Ia65306cc825b71fe0b89c7f8545ce1c71a81d86b, this will allow
for a Graphite-specific variant of SkiaVkRenderEngine.

waitFence and flushAndSubmit are kept on the *RenderEngine classes (as
opposed to the recently added SkiaGpuContext abstraction) because they
are specific to the intersection of both <Skia backend> x <GPU API>,
with 3 variants. Their logic is also RE-specific, and not suitable for
a Skia abstraction.

Misc. cleanup:
- Remove SkiaVkRenderEngine's flush() and mBackendContext declarations
  as they were undefined and unnecessary.
- Mark some local variables as const.
- Pass named constant to GrDirectContext::wait in
  GaneshVkRenderEngine::waitFence

Test: manual validation & existing tests (refactor)
Bug: b/293371537
Change-Id: I695a0554b20ca14cf475aeff1b92c4445c1af55b
diff --git a/libs/renderengine/skia/SkiaVkRenderEngine.h b/libs/renderengine/skia/SkiaVkRenderEngine.h
index 28b7595..5fd911f 100644
--- a/libs/renderengine/skia/SkiaVkRenderEngine.h
+++ b/libs/renderengine/skia/SkiaVkRenderEngine.h
@@ -71,20 +71,21 @@
     };
 
 protected:
+    // Redeclare parent functions that Ganesh vs. Graphite subclasses must implement.
+    virtual void waitFence(SkiaGpuContext* context, base::borrowed_fd fenceFd) override = 0;
+    virtual base::unique_fd flushAndSubmit(SkiaGpuContext* context) override = 0;
+
+    SkiaVkRenderEngine(const RenderEngineCreationArgs& args);
+
     // Implementations of abstract SkiaRenderEngine functions specific to
-    // rendering backend
+    // Vulkan, but shareable between Ganesh and Graphite.
     SkiaRenderEngine::Contexts createContexts() override;
     bool supportsProtectedContentImpl() const override;
     bool useProtectedContextImpl(GrProtected isProtected) override;
-    void waitFence(SkiaGpuContext* context, base::borrowed_fd fenceFd) override;
-    base::unique_fd flushAndSubmit(SkiaGpuContext* context) override;
     void appendBackendSpecificInfoToDump(std::string& result) override;
 
-private:
-    SkiaVkRenderEngine(const RenderEngineCreationArgs& args);
-    base::unique_fd flush();
-
-    GrVkBackendContext mBackendContext;
+    // TODO: b/300533018 - refactor this to be non-static
+    static VulkanInterface& getVulkanInterface(bool protectedContext);
 };
 
 } // namespace skia