Replace some nullptrs with VK_NULL_HANDLE
Also ensures GrVkRenderPass.h ends with a LF.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1758003002
NOTRY=true
Review URL: https://codereview.chromium.org/1758003002
diff --git a/src/gpu/vk/GrVkImage.h b/src/gpu/vk/GrVkImage.h
index 3467a61..eb0f7bf 100644
--- a/src/gpu/vk/GrVkImage.h
+++ b/src/gpu/vk/GrVkImage.h
@@ -29,7 +29,7 @@
VkDeviceMemory fAlloc;
Flags fFlags;
- Resource() : INHERITED(), fImage(nullptr), fAlloc(nullptr), fFlags(kNo_Flags) {}
+ Resource() : INHERITED(), fImage(VK_NULL_HANDLE), fAlloc(VK_NULL_HANDLE), fFlags(kNo_Flags) {}
Resource(VkImage image, VkDeviceMemory alloc, Flags flags)
: fImage(image), fAlloc(alloc), fFlags(flags) {}
diff --git a/src/gpu/vk/GrVkPipeline.cpp b/src/gpu/vk/GrVkPipeline.cpp
index 8c05de5..becebac 100644
--- a/src/gpu/vk/GrVkPipeline.cpp
+++ b/src/gpu/vk/GrVkPipeline.cpp
@@ -495,7 +495,7 @@
VkPipeline vkPipeline;
VkResult err = GR_VK_CALL(gpu->vkInterface(), CreateGraphicsPipelines(gpu->device(),
- nullptr, 1,
+ VK_NULL_HANDLE, 1,
&pipelineCreateInfo,
nullptr, &vkPipeline));
if (err) {
diff --git a/src/gpu/vk/GrVkProgram.cpp b/src/gpu/vk/GrVkProgram.cpp
index 00f01b7..0e1e201 100644
--- a/src/gpu/vk/GrVkProgram.cpp
+++ b/src/gpu/vk/GrVkProgram.cpp
@@ -100,18 +100,18 @@
GR_VK_CALL(gpu->vkInterface(), DestroyPipelineLayout(gpu->device(),
fPipelineLayout,
nullptr));
- fPipelineLayout = nullptr;
+ fPipelineLayout = VK_NULL_HANDLE;
}
if (fDSLayout[0]) {
GR_VK_CALL(gpu->vkInterface(), DestroyDescriptorSetLayout(gpu->device(), fDSLayout[0],
nullptr));
- fDSLayout[0] = nullptr;
+ fDSLayout[0] = VK_NULL_HANDLE;
}
if (fDSLayout[1]) {
GR_VK_CALL(gpu->vkInterface(), DestroyDescriptorSetLayout(gpu->device(), fDSLayout[1],
nullptr));
- fDSLayout[1] = nullptr;
+ fDSLayout[1] = VK_NULL_HANDLE;
}
if (fVertexUniformBuffer) {
@@ -129,9 +129,9 @@
fPipeline = nullptr;
fDescriptorPool->unrefAndAbandon();
fDescriptorPool = nullptr;
- fPipelineLayout = nullptr;
- fDSLayout[0] = nullptr;
- fDSLayout[1] = nullptr;
+ fPipelineLayout = VK_NULL_HANDLE;
+ fDSLayout[0] = VK_NULL_HANDLE;
+ fDSLayout[1] = VK_NULL_HANDLE;
fVertexUniformBuffer->abandon();
fFragmentUniformBuffer->abandon();
diff --git a/src/gpu/vk/GrVkRenderPass.h b/src/gpu/vk/GrVkRenderPass.h
index d460741..2f7e287 100644
--- a/src/gpu/vk/GrVkRenderPass.h
+++ b/src/gpu/vk/GrVkRenderPass.h
@@ -19,7 +19,7 @@
class GrVkRenderPass : public GrVkResource {
public:
- GrVkRenderPass() : INHERITED(), fRenderPass(nullptr) {}
+ GrVkRenderPass() : INHERITED(), fRenderPass(VK_NULL_HANDLE) {}
void initSimple(const GrVkGpu* gpu, const GrVkRenderTarget& target);
struct AttachmentsDescriptor {
@@ -87,4 +87,4 @@
GR_MAKE_BITFIELD_OPS(GrVkRenderPass::AttachmentFlags);
-#endif
\ No newline at end of file
+#endif