Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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:
25
27 Type viewType, uint32_t miplevels,
28 const GrVkYcbcrConversionInfo& ycbcrInfo);
29
30 VkImageView imageView() const { return fImageView; }
31
32#ifdef SK_TRACE_MANAGED_RESOURCES
33 void dumpInfo() const override {
34 SkDebugf("GrVkImageView: %" PRIdPTR " (%d refs)\n",
35 (intptr_t)fImageView, this->getRefCnt());
36 }
37#endif
38
39private:
40 GrVkImageView(const GrVkGpu* gpu, VkImageView imageView,
41 GrVkSamplerYcbcrConversion* ycbcrConversion)
42 : INHERITED(gpu), fImageView(imageView), fYcbcrConversion(ycbcrConversion) {}
43
44 void freeGPUData() const override;
45
46 VkImageView fImageView;
47 GrVkSamplerYcbcrConversion* fYcbcrConversion;
48
49 using INHERITED = GrVkManagedResource;
50};
51
52#endif
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static sk_sp< const GrVkImageView > Make(GrVkGpu *gpu, VkImage image, VkFormat format, Type viewType, uint32_t miplevels, const GrVkYcbcrConversionInfo &ycbcrInfo)
VkImageView imageView() const
void freeGPUData() const override
sk_sp< SkImage > image
Definition examples.cpp:29
uint32_t uint32_t * format
VkFormat