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

Side by Side Diff: src/gpu/vk/GrVkBackendContext.cpp

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « src/gpu/text/GrFontScaler.cpp ('k') | src/gpu/vk/GrVkBuffer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "vk/GrVkBackendContext.h" 8 #include "vk/GrVkBackendContext.h"
9 #include "vk/GrVkExtensions.h" 9 #include "vk/GrVkExtensions.h"
10 #include "vk/GrVkInterface.h" 10 #include "vk/GrVkInterface.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 #endif 161 #endif
162 if (extensions.hasDeviceExtension("VK_NV_glsl_shader")) { 162 if (extensions.hasDeviceExtension("VK_NV_glsl_shader")) {
163 deviceExtensionNames.push_back("VK_NV_glsl_shader"); 163 deviceExtensionNames.push_back("VK_NV_glsl_shader");
164 extensionFlags |= kNV_glsl_shader_GrVkExtensionFlag; 164 extensionFlags |= kNV_glsl_shader_GrVkExtensionFlag;
165 } 165 }
166 166
167 // query to get the physical device properties 167 // query to get the physical device properties
168 VkPhysicalDeviceFeatures deviceFeatures; 168 VkPhysicalDeviceFeatures deviceFeatures;
169 vkGetPhysicalDeviceFeatures(physDev, &deviceFeatures); 169 vkGetPhysicalDeviceFeatures(physDev, &deviceFeatures);
170 // this looks like it would slow things down, 170 // this looks like it would slow things down,
171 // and we can't depend on it on all platforms 171 // and we can't depend on it on all platforms
172 deviceFeatures.robustBufferAccess = VK_FALSE; 172 deviceFeatures.robustBufferAccess = VK_FALSE;
173 173
174 uint32_t featureFlags = 0; 174 uint32_t featureFlags = 0;
175 if (deviceFeatures.geometryShader) { 175 if (deviceFeatures.geometryShader) {
176 featureFlags |= kGeometryShader_GrVkFeatureFlag; 176 featureFlags |= kGeometryShader_GrVkFeatureFlag;
177 } 177 }
178 if (deviceFeatures.dualSrcBlend) { 178 if (deviceFeatures.dualSrcBlend) {
179 featureFlags |= kDualSrcBlend_GrVkFeatureFlag; 179 featureFlags |= kDualSrcBlend_GrVkFeatureFlag;
180 } 180 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 GrVkBackendContext* ctx = new GrVkBackendContext(); 218 GrVkBackendContext* ctx = new GrVkBackendContext();
219 ctx->fInstance = inst; 219 ctx->fInstance = inst;
220 ctx->fPhysicalDevice = physDev; 220 ctx->fPhysicalDevice = physDev;
221 ctx->fDevice = device; 221 ctx->fDevice = device;
222 ctx->fQueue = queue; 222 ctx->fQueue = queue;
223 ctx->fQueueFamilyIndex = graphicsQueueIndex; 223 ctx->fQueueFamilyIndex = graphicsQueueIndex;
224 ctx->fMinAPIVersion = kGrVkMinimumVersion; 224 ctx->fMinAPIVersion = kGrVkMinimumVersion;
225 ctx->fExtensions = extensionFlags; 225 ctx->fExtensions = extensionFlags;
226 ctx->fFeatures = featureFlags; 226 ctx->fFeatures = featureFlags;
227 ctx->fInterface.reset(GrVkCreateInterface(inst, device, extensionFlags)); 227 ctx->fInterface.reset(GrVkCreateInterface(inst, device, extensionFlags));
228 228
229 return ctx; 229 return ctx;
230 } 230 }
231 231
232 GrVkBackendContext::~GrVkBackendContext() { 232 GrVkBackendContext::~GrVkBackendContext() {
233 vkDestroyDevice(fDevice, nullptr); 233 vkDestroyDevice(fDevice, nullptr);
234 fDevice = VK_NULL_HANDLE; 234 fDevice = VK_NULL_HANDLE;
235 vkDestroyInstance(fInstance, nullptr); 235 vkDestroyInstance(fInstance, nullptr);
236 fInstance = VK_NULL_HANDLE; 236 fInstance = VK_NULL_HANDLE;
237 } 237 }
OLDNEW
« no previous file with comments | « src/gpu/text/GrFontScaler.cpp ('k') | src/gpu/vk/GrVkBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698