Vulkan: Move the CommandGraphNode class to the cpp.

This totally hides the details of the CommandGraphNode implementation
from the rest of the back-end. This continues the simplification of
the graph/resource APIs.

Refactoring change only.

Bug: angleproject:2539
Change-Id: I7e0f286c387599624cfdff6c8972a8e082fe05d3
Reviewed-on: https://chromium-review.googlesource.com/1052069
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/CommandGraph.h b/src/libANGLE/renderer/vulkan/CommandGraph.h
index 84469ce..c4f7122 100644
--- a/src/libANGLE/renderer/vulkan/CommandGraph.h
+++ b/src/libANGLE/renderer/vulkan/CommandGraph.h
@@ -17,6 +17,7 @@
 
 namespace vk
 {
+class CommandGraphNode;
 
 // This is a helper class for back-end objects used in Vk command buffers. It records a serial
 // at command recording times indicating an order in the queue. We use Fences to detect when
@@ -114,78 +115,7 @@
 // and outside RenderPasses as necessary, filled with the right load/store operations. Once
 // the primary CommandBuffer has recorded all of the secondary CommandBuffers from all the open
 // CommandGraphNodes, we submit the primary CommandBuffer to the VkQueue on the device.
-
-class CommandGraphNode final : angle::NonCopyable
-{
-  public:
-    CommandGraphNode();
-    ~CommandGraphNode();
-
-    // Immutable queries for when we're walking the commands tree.
-    CommandBuffer *getOutsideRenderPassCommands();
-    CommandBuffer *getInsideRenderPassCommands();
-
-    // For outside the render pass (copies, transitions, etc).
-    Error beginOutsideRenderPassRecording(VkDevice device,
-                                          const CommandPool &commandPool,
-                                          CommandBuffer **commandsOut);
-
-    // For rendering commands (draws).
-    Error beginInsideRenderPassRecording(RendererVk *renderer, CommandBuffer **commandsOut);
-
-    // storeRenderPassInfo and append*RenderTarget store info relevant to the RenderPass.
-    void storeRenderPassInfo(const Framebuffer &framebuffer,
-                             const gl::Rectangle renderArea,
-                             const vk::RenderPassDesc &renderPassDesc,
-                             const std::vector<VkClearValue> &clearValues);
-
-    // Dependency commands order node execution in the command graph.
-    // Once a node has commands that must happen after it, recording is stopped and the node is
-    // frozen forever.
-    static void SetHappensBeforeDependency(CommandGraphNode *beforeNode,
-                                           CommandGraphNode *afterNode);
-    static void SetHappensBeforeDependencies(const std::vector<CommandGraphNode *> &beforeNodes,
-                                             CommandGraphNode *afterNode);
-    bool hasParents() const;
-    bool hasChildren() const;
-
-    // Commands for traversing the node on a flush operation.
-    VisitedState visitedState() const;
-    void visitParents(std::vector<CommandGraphNode *> *stack);
-    Error visitAndExecute(VkDevice device,
-                          Serial serial,
-                          RenderPassCache *renderPassCache,
-                          CommandBuffer *primaryCommandBuffer);
-
-    const gl::Rectangle &getRenderPassRenderArea() const;
-
-  private:
-    void setHasChildren();
-
-    // Used for testing only.
-    bool isChildOf(CommandGraphNode *parent);
-
-    // Only used if we need a RenderPass for these commands.
-    RenderPassDesc mRenderPassDesc;
-    Framebuffer mRenderPassFramebuffer;
-    gl::Rectangle mRenderPassRenderArea;
-    gl::AttachmentArray<VkClearValue> mRenderPassClearValues;
-
-    // Keep a separate buffers for commands inside and outside a RenderPass.
-    // TODO(jmadill): We might not need inside and outside RenderPass commands separate.
-    CommandBuffer mOutsideRenderPassCommands;
-    CommandBuffer mInsideRenderPassCommands;
-
-    // Parents are commands that must be submitted before 'this' CommandNode can be submitted.
-    std::vector<CommandGraphNode *> mParents;
-
-    // If this is true, other commands exist that must be submitted after 'this' command.
-    bool mHasChildren;
-
-    // Used when traversing the dependency graph.
-    VisitedState mVisitedState;
-};
-
+//
 // The Command Graph consists of an array of open Command Graph Nodes. It supports allocating new
 // nodes for the graph, which are linked via dependency relation calls in CommandGraphNode, and
 // also submitting the whole command graph via submitCommands.