Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Unified Diff: gpu/vulkan/vulkan_render_pass.cc

Issue 1829163003: Added initial implementation of the Vulkan Context Provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vk_surface_patch
Patch Set: Block off vulkan_cc with enable_vulkan (not relevant in future patch) Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/vulkan/vulkan_render_pass.h ('k') | gpu/vulkan/vulkan_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/vulkan/vulkan_render_pass.cc
diff --git a/gpu/vulkan/vulkan_render_pass.cc b/gpu/vulkan/vulkan_render_pass.cc
index 84f630f6a54d8e0d14114b42fa8427feb79a8ec2..a142fc1b3ee6d38d03ad805f76c1aa915416c60a 100644
--- a/gpu/vulkan/vulkan_render_pass.cc
+++ b/gpu/vulkan/vulkan_render_pass.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "gpu/vulkan/vulkan_command_buffer.h"
+#include "gpu/vulkan/vulkan_device_queue.h"
#include "gpu/vulkan/vulkan_image_view.h"
#include "gpu/vulkan/vulkan_implementation.h"
#include "gpu/vulkan/vulkan_swap_chain.h"
@@ -127,7 +128,8 @@ VulkanRenderPass::RenderPassData::RenderPassData() {}
VulkanRenderPass::RenderPassData::~RenderPassData() {}
-VulkanRenderPass::VulkanRenderPass() {}
+VulkanRenderPass::VulkanRenderPass(VulkanDeviceQueue* device_queue)
+ : device_queue_(device_queue) {}
VulkanRenderPass::~VulkanRenderPass() {
DCHECK_EQ(static_cast<VkRenderPass>(VK_NULL_HANDLE), render_pass_);
@@ -158,7 +160,7 @@ bool VulkanRenderPass::Initialize(const VulkanSwapChain* swap_chain,
DCHECK(frame_buffers_.empty());
DCHECK(render_pass_data.ValidateData(swap_chain));
- VkDevice device = GetVulkanDevice();
+ VkDevice device = device_queue_->GetVulkanDevice();
VkResult result = VK_SUCCESS;
swap_chain_ = swap_chain;
@@ -328,7 +330,7 @@ bool VulkanRenderPass::Initialize(const VulkanSwapChain* swap_chain,
}
void VulkanRenderPass::Destroy() {
- VkDevice device = GetVulkanDevice();
+ VkDevice device = device_queue_->GetVulkanDevice();
for (VkFramebuffer frame_buffer : frame_buffers_) {
vkDestroyFramebuffer(device, frame_buffer, nullptr);
« no previous file with comments | « gpu/vulkan/vulkan_render_pass.h ('k') | gpu/vulkan/vulkan_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698