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

Side by Side Diff: include/gpu/vk/GrVkBackendContext.h

Issue 1899213002: Revise WSI setup. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Updated for comments 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 | « gyp/most.gyp ('k') | include/gpu/vk/GrVkInterface.h » ('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 2016 Google Inc. 2 * Copyright 2016 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 #ifndef GrVkBackendContext_DEFINED 8 #ifndef GrVkBackendContext_DEFINED
9 #define GrVkBackendContext_DEFINED 9 #define GrVkBackendContext_DEFINED
10 10
(...skipping 27 matching lines...) Expand all
38 // is that the client will set these up and pass them to the GrVkGpu constructor . The VkDevice 38 // is that the client will set these up and pass them to the GrVkGpu constructor . The VkDevice
39 // created must support at least one graphics queue, which is passed in as well. 39 // created must support at least one graphics queue, which is passed in as well.
40 // The QueueFamilyIndex must match the family of the given queue. It is needed f or CommandPool 40 // The QueueFamilyIndex must match the family of the given queue. It is needed f or CommandPool
41 // creation, and any GrBackendObjects handed to us (e.g., for wrapped textures) need to be created 41 // creation, and any GrBackendObjects handed to us (e.g., for wrapped textures) need to be created
42 // in or transitioned to that family. 42 // in or transitioned to that family.
43 struct GrVkBackendContext : public SkRefCnt { 43 struct GrVkBackendContext : public SkRefCnt {
44 VkInstance fInstance; 44 VkInstance fInstance;
45 VkPhysicalDevice fPhysicalDevice; 45 VkPhysicalDevice fPhysicalDevice;
46 VkDevice fDevice; 46 VkDevice fDevice;
47 VkQueue fQueue; 47 VkQueue fQueue;
48 uint32_t fQueueFamilyIndex; 48 uint32_t fGraphicsQueueIndex;
49 uint32_t fMinAPIVersion; 49 uint32_t fMinAPIVersion;
50 uint32_t fExtensions; 50 uint32_t fExtensions;
51 uint32_t fFeatures; 51 uint32_t fFeatures;
52 SkAutoTUnref<const GrVkInterface> fInterface; 52 SkAutoTUnref<const GrVkInterface> fInterface;
53 53
54 // Helper function to create the default Vulkan objects needed by the GrVkGp u object 54 // Helper function to create the default Vulkan objects needed by the GrVkGp u object
55 static const GrVkBackendContext* Create(); 55 // If presentQueueIndex is non-NULL, will try to set up presentQueue as part of device
56 // creation. canPresent() is a device-dependent function.
57 static const GrVkBackendContext* Create(uint32_t* presentQueueIndex = nullpt r,
58 bool(*canPresent)(VkInstance, VkPhysicalDevice, uint32_t que ueIndex) = nullptr);
56 59
57 ~GrVkBackendContext() override; 60 ~GrVkBackendContext() override;
58 }; 61 };
59 62
60 #endif 63 #endif
OLDNEW
« no previous file with comments | « gyp/most.gyp ('k') | include/gpu/vk/GrVkInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698