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

Side by Side Diff: gpu/vulkan/vulkan_surface.cc

Issue 1892303003: Added the Vulkan Context Provider implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Export VulkanContextProvider 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_surface.h ('k') | no next file » | 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 #include "gpu/vulkan/vulkan_surface.h" 5 #include "gpu/vulkan/vulkan_surface.h"
6 6
7 #include <vulkan/vulkan.h> 7 #include <vulkan/vulkan.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "gpu/vulkan/vulkan_command_buffer.h" 10 #include "gpu/vulkan/vulkan_command_buffer.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 protected: 141 protected:
142 gfx::AcceleratedWidget window_; 142 gfx::AcceleratedWidget window_;
143 gfx::Size size_; 143 gfx::Size size_;
144 VkSurfaceKHR surface_ = VK_NULL_HANDLE; 144 VkSurfaceKHR surface_ = VK_NULL_HANDLE;
145 VkSurfaceFormatKHR surface_format_ = {}; 145 VkSurfaceFormatKHR surface_format_ = {};
146 VulkanDeviceQueue* device_queue_ = nullptr; 146 VulkanDeviceQueue* device_queue_ = nullptr;
147 VulkanSwapChain swap_chain_; 147 VulkanSwapChain swap_chain_;
148 }; 148 };
149 149
150 // static
151 bool VulkanSurface::InitializeOneOff() {
152 if (!InitializeVulkan())
153 return false;
154
155 return true;
156 }
157
158 VulkanSurface::~VulkanSurface() {} 150 VulkanSurface::~VulkanSurface() {}
159 151
160 // static 152 // static
161 std::unique_ptr<VulkanSurface> VulkanSurface::CreateViewSurface( 153 std::unique_ptr<VulkanSurface> VulkanSurface::CreateViewSurface(
162 gfx::AcceleratedWidget window) { 154 gfx::AcceleratedWidget window) {
163 return std::unique_ptr<VulkanSurface>(new VulkanWSISurface(window)); 155 return std::unique_ptr<VulkanSurface>(new VulkanWSISurface(window));
164 } 156 }
165 157
166 VulkanSurface::VulkanSurface() {} 158 VulkanSurface::VulkanSurface() {}
167 159
168 } // namespace gpu 160 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/vulkan/vulkan_surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698