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

Side by Side Diff: gpu/vulkan/vulkan_device_queue.h

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « gpu/vulkan/vulkan_command_pool.cc ('k') | gpu/vulkan/vulkan_device_queue.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_VULKAN_VULKAN_DEVICE_QUEUE_H_ 5 #ifndef GPU_VULKAN_VULKAN_DEVICE_QUEUE_H_
6 #define GPU_VULKAN_VULKAN_DEVICE_QUEUE_H_ 6 #define GPU_VULKAN_VULKAN_DEVICE_QUEUE_H_
7 7
8 #include <vulkan/vulkan.h> 8 #include <vulkan/vulkan.h>
9 9
10 #include <memory>
11
10 #include "base/logging.h" 12 #include "base/logging.h"
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "gpu/vulkan/vulkan_export.h" 14 #include "gpu/vulkan/vulkan_export.h"
14 15
15 namespace gpu { 16 namespace gpu {
16 17
17 class VulkanCommandPool; 18 class VulkanCommandPool;
18 19
19 class VULKAN_EXPORT VulkanDeviceQueue { 20 class VULKAN_EXPORT VulkanDeviceQueue {
20 public: 21 public:
21 enum DeviceQueueOption { 22 enum DeviceQueueOption {
22 GRAPHICS_QUEUE_FLAG = 0x01, 23 GRAPHICS_QUEUE_FLAG = 0x01,
(...skipping 17 matching lines...) Expand all
40 return vk_device_; 41 return vk_device_;
41 } 42 }
42 43
43 VkQueue GetVulkanQueue() const { 44 VkQueue GetVulkanQueue() const {
44 DCHECK_NE(static_cast<VkQueue>(VK_NULL_HANDLE), vk_queue_); 45 DCHECK_NE(static_cast<VkQueue>(VK_NULL_HANDLE), vk_queue_);
45 return vk_queue_; 46 return vk_queue_;
46 } 47 }
47 48
48 uint32_t GetVulkanQueueIndex() const { return vk_queue_index_; } 49 uint32_t GetVulkanQueueIndex() const { return vk_queue_index_; }
49 50
50 scoped_ptr<gpu::VulkanCommandPool> CreateCommandPool(); 51 std::unique_ptr<gpu::VulkanCommandPool> CreateCommandPool();
51 52
52 private: 53 private:
53 VkPhysicalDevice vk_physical_device_ = VK_NULL_HANDLE; 54 VkPhysicalDevice vk_physical_device_ = VK_NULL_HANDLE;
54 VkDevice vk_device_ = VK_NULL_HANDLE; 55 VkDevice vk_device_ = VK_NULL_HANDLE;
55 VkQueue vk_queue_ = VK_NULL_HANDLE; 56 VkQueue vk_queue_ = VK_NULL_HANDLE;
56 uint32_t vk_queue_index_ = 0; 57 uint32_t vk_queue_index_ = 0;
57 58
58 DISALLOW_COPY_AND_ASSIGN(VulkanDeviceQueue); 59 DISALLOW_COPY_AND_ASSIGN(VulkanDeviceQueue);
59 }; 60 };
60 61
61 } // namespace gpu 62 } // namespace gpu
62 63
63 #endif // GPU_VULKAN_VULKAN_DEVICE_QUEUE_H_ 64 #endif // GPU_VULKAN_VULKAN_DEVICE_QUEUE_H_
OLDNEW
« no previous file with comments | « gpu/vulkan/vulkan_command_pool.cc ('k') | gpu/vulkan/vulkan_device_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698