Vulkan: Merge append/beginWriteResource.

The new API is named 'recordCommands'.

These two APIs were basically doing the same thing. We don't need to
have an understanding of creating a new graph node to know that we
want to record some Vulkan commands to a command buffer. The prior
design was actually masking a bug where we would allow appending
commands to a command graph node that had already started a render
pass. Fix this by adding a render pass check to recordCommands.

Also removes 'hasStartedWriteResource' since this method wasn't used
anywhere.

Also renames 'onResourceChanged' to 'finishCurrentCommands'.

Bug: angleproject:2828
Change-Id: I00bd5b893fcfc37172b6c1706cb2f5fc57e79f54
Reviewed-on: https://chromium-review.googlesource.com/1235654
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/SurfaceVk.cpp b/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
index e1a58d0..bd7a94b 100644
--- a/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
+++ b/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
@@ -480,7 +480,7 @@
 
     // Allocate a command buffer for clearing our images to black.
     vk::CommandBuffer *commandBuffer = nullptr;
-    ANGLE_TRY(beginWriteResource(displayVk, &commandBuffer));
+    ANGLE_TRY(recordCommands(displayVk, &commandBuffer));
 
     VkClearColorValue transparentBlack;
     transparentBlack.float32[0] = 0.0f;
@@ -565,7 +565,7 @@
     RendererVk *renderer = displayVk->getRenderer();
 
     vk::CommandBuffer *swapCommands = nullptr;
-    ANGLE_TRY(beginWriteResource(displayVk, &swapCommands));
+    ANGLE_TRY(recordCommands(displayVk, &swapCommands));
 
     SwapchainImage &image = mSwapchainImages[mCurrentSwapchainImageIndex];