Use GrVkFramebuffer throughout GrVkOpsRenderPass instead of GrVkRT.

This also connects a lot of the wires needed to use dynamic MSAA in
vulkan. By using the framebuffer object in the render pass we can figure
out the specific framebuffer we want in one place, GrVkGpu::onGetOpsRenderPass,
and then the render pass itself doesn't need any explicit knowledge of
dmsaa stuff.

Bug: skia:11809
Change-Id: I3e4e71fa6f9536fdaf915d5369a2f8a24bf48c9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397156
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/vk/GrVkFramebuffer.cpp b/src/gpu/vk/GrVkFramebuffer.cpp
index ec14134..5dffcc8 100644
--- a/src/gpu/vk/GrVkFramebuffer.cpp
+++ b/src/gpu/vk/GrVkFramebuffer.cpp
@@ -15,7 +15,7 @@
 
 GrVkFramebuffer* GrVkFramebuffer::Create(
         GrVkGpu* gpu,
-        int width, int height,
+        SkISize dimensions,
         const GrVkRenderPass* renderPass,
         GrVkAttachment* colorAttachment,
         GrVkAttachment* resolveAttachment,
@@ -43,8 +43,8 @@
     createInfo.renderPass = renderPass->vkRenderPass();
     createInfo.attachmentCount = numAttachments;
     createInfo.pAttachments = attachments;
-    createInfo.width = width;
-    createInfo.height = height;
+    createInfo.width = dimensions.width();
+    createInfo.height = dimensions.height();
     createInfo.layers = 1;
 
     VkFramebuffer framebuffer;
@@ -71,7 +71,9 @@
         , fColorAttachment(std::move(colorAttachment))
         , fResolveAttachment(std::move(resolveAttachment))
         , fStencilAttachment(std::move(stencilAttachment))
-        , fCompatibleRenderPassHandle(compatibleRPHandle) {}
+        , fCompatibleRenderPassHandle(compatibleRPHandle) {
+    SkASSERT(fCompatibleRenderPassHandle.isValid());
+}
 
 GrVkFramebuffer::GrVkFramebuffer(const GrVkGpu* gpu,
                                  sk_sp<GrVkAttachment> colorAttachment,