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

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

Issue 1825593002: GrVkGpu initialization cleanup. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments (and rebase to ToT) 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 unified diff | Download patch
« no previous file with comments | « gyp/gpu.gypi ('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
(Empty)
1 /*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrVkBackendContext_DEFINED
9 #define GrVkBackendContext_DEFINED
10
11 #include "SkRefCnt.h"
12
13 #include "vulkan/vulkan.h"
14
15 #ifdef SK_DEBUG
16 #define ENABLE_VK_LAYERS
17 #endif
18
19 struct GrVkInterface;
20
21 // The BackendContext contains all of the base Vulkan objects needed by the GrVk Gpu. The assumption
22 // is that the client will set these up and pass them to the GrVkGpu constructor . The VkDevice
23 // created must support at least one graphics queue, which is passed in as well.
24 // The QueueFamilyIndex must match the family of the given queue. It is needed f or CommandPool
25 // creation, and any GrBackendObjects handed to us (e.g., for wrapped textures) need to be created
26 // in or transitioned to that family.
27 struct GrVkBackendContext : public SkRefCnt {
28 VkInstance fInstance;
29 VkPhysicalDevice fPhysicalDevice;
30 VkDevice fDevice;
31 VkQueue fQueue;
32 uint32_t fQueueFamilyIndex;
33 SkAutoTUnref<const GrVkInterface> fInterface;
34
35 // Helper function to create the default Vulkan objects needed by the GrVkGp u object
36 static const GrVkBackendContext* Create();
37
38 ~GrVkBackendContext() override;
39 };
40
41 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/vk/GrVkInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698