Flutter Engine
The Flutter Engine
Classes | Namespaces | Functions
GrVkTypesPriv.h File Reference
#include "include/core/SkRefCnt.h"
#include "include/gpu/vk/GrVkTypes.h"
#include "include/gpu/vk/VulkanTypes.h"

Go to the source code of this file.

Classes

struct  GrVkImageSpec
 

Namespaces

namespace  skgpu
 

Functions

GrVkImageInfo GrVkImageInfoWithMutableState (const GrVkImageInfo &, const skgpu::MutableTextureState *)
 
GrVkSurfaceInfo GrVkImageSpecToSurfaceInfo (const GrVkImageSpec &vkSpec, uint32_t sampleCount, uint32_t levelCount, skgpu::Protected isProtected)
 

Function Documentation

◆ GrVkImageInfoWithMutableState()

GrVkImageInfo GrVkImageInfoWithMutableState ( const GrVkImageInfo info,
const skgpu::MutableTextureState mutableState 
)

Definition at line 14 of file GrVkTypesPriv.cpp.

15 {
16 SkASSERT(mutableState);
17 GrVkImageInfo newInfo = info;
20 return newInfo;
21}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
#define SkASSERT(cond)
Definition: SkAssert.h:116
SK_API uint32_t GetVkQueueFamilyIndex(const MutableTextureState &state)
SK_API VkImageLayout GetVkImageLayout(const MutableTextureState &state)
uint32_t fCurrentQueueFamily
Definition: GrVkTypes.h:34
VkImageLayout fImageLayout
Definition: GrVkTypes.h:29

◆ GrVkImageSpecToSurfaceInfo()

GrVkSurfaceInfo GrVkImageSpecToSurfaceInfo ( const GrVkImageSpec vkSpec,
uint32_t  sampleCount,
uint32_t  levelCount,
skgpu::Protected  isProtected 
)

Definition at line 23 of file GrVkTypesPriv.cpp.

26 {
28 // Shared info
29 info.fSampleCount = sampleCount;
30 info.fLevelCount = levelCount;
31 info.fProtected = isProtected;
32
33 // Vulkan info
34 info.fImageTiling = vkSpec.fImageTiling;
35 info.fFormat = vkSpec.fFormat;
36 info.fImageUsageFlags = vkSpec.fImageUsageFlags;
37 info.fYcbcrConversionInfo = vkSpec.fYcbcrConversionInfo;
38 info.fSharingMode = vkSpec.fSharingMode;
39
40 return info;
41}
VkImageUsageFlags fImageUsageFlags
Definition: GrVkTypesPriv.h:38
VkFormat fFormat
Definition: GrVkTypesPriv.h:37
skgpu::VulkanYcbcrConversionInfo fYcbcrConversionInfo
Definition: GrVkTypesPriv.h:39
VkSharingMode fSharingMode
Definition: GrVkTypesPriv.h:40
VkImageTiling fImageTiling
Definition: GrVkTypesPriv.h:36