blob: 2d3c558ed9e170aeb532740ae5ba879a3ff1b45a [file] [log] [blame]
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_TEXTURE_HOLDER_VK_H_
#define GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_TEXTURE_HOLDER_VK_H_
#include <memory>
#include "third_party/skia/include/core/SkPromiseImageTexture.h"
#include "third_party/skia/include/gpu/GrBackendSurface.h"
#include "third_party/skia/include/gpu/vk/GrVkTypes.h"
namespace gpu {
class VulkanImage;
// Holds VulkanImage + skia representations of it.
struct TextureHolderVk {
explicit TextureHolderVk(std::unique_ptr<VulkanImage> image);
TextureHolderVk(TextureHolderVk&& other);
TextureHolderVk& operator=(TextureHolderVk&& other);
~TextureHolderVk();
GrVkImageInfo GetGrVkImageInfo() const;
std::unique_ptr<VulkanImage> vulkan_image;
GrBackendTexture backend_texture;
sk_sp<SkPromiseImageTexture> promise_texture;
};
} // namespace gpu
#endif // GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_TEXTURE_HOLDER_VK_H_