Flutter Engine
The Flutter Engine
GrVkImageView.h
Go to the documentation of this file.
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 GrVkImageView_DEFINED
9#define GrVkImageView_DEFINED
10
11#include "include/gpu/GrTypes.h"
14
15#include <cinttypes>
16
18
20public:
21 enum Type {
24 };
25
27 VkImage image,
29 Type viewType,
30 uint32_t miplevels,
31 const skgpu::VulkanYcbcrConversionInfo& ycbcrInfo);
32
33 VkImageView imageView() const { return fImageView; }
34
35#ifdef SK_TRACE_MANAGED_RESOURCES
36 void dumpInfo() const override {
37 SkDebugf("GrVkImageView: %" PRIdPTR " (%d refs)\n",
38 (intptr_t)fImageView, this->getRefCnt());
39 }
40#endif
41
42private:
43 GrVkImageView(const GrVkGpu* gpu, VkImageView imageView,
44 GrVkSamplerYcbcrConversion* ycbcrConversion)
45 : INHERITED(gpu), fImageView(imageView), fYcbcrConversion(ycbcrConversion) {}
46
47 void freeGPUData() const override;
48
49 VkImageView fImageView;
50 GrVkSamplerYcbcrConversion* fYcbcrConversion;
51
52 using INHERITED = GrVkManagedResource;
53};
54
55#endif
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
VkImageView imageView() const
Definition: GrVkImageView.h:33
static sk_sp< const GrVkImageView > Make(GrVkGpu *gpu, VkImage image, VkFormat format, Type viewType, uint32_t miplevels, const skgpu::VulkanYcbcrConversionInfo &ycbcrInfo)
GrVkManagedResource(const GrVkGpu *gpu)
uint32_t uint32_t * format
sk_sp< const SkImage > image
Definition: SkRecords.h:269
VkFormat
Definition: vulkan_core.h:1458