#include "gpu/command_buffer/service/shared_image/external_vk_image_gl_representation.h"
#include <vector>
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "gpu/command_buffer/service/texture_manager.h"
#include "gpu/vulkan/vulkan_util.h"
#include "ui/gl/gl_bindings.h"
namespace gpu {
namespace {
template <typename T>
std::vector<GLuint> GetTextureIds(const std::vector<T>& textures) { … }
}
void ExternalVkImageGLRepresentationShared::AcquireTexture(
ExternalSemaphore* semaphore,
const std::vector<GLuint>& texture_ids,
const std::vector<GLenum>& src_layouts) { … }
ExternalSemaphore ExternalVkImageGLRepresentationShared::ReleaseTexture(
ExternalSemaphorePool* pool,
const std::vector<GLuint>& texture_ids,
const std::vector<GLenum>& dst_layouts) { … }
ExternalVkImageGLRepresentationShared::ExternalVkImageGLRepresentationShared(
SharedImageBacking* backing,
std::vector<GLuint> texture_service_ids)
: … { … }
ExternalVkImageGLRepresentationShared::
~ExternalVkImageGLRepresentationShared() = default;
bool ExternalVkImageGLRepresentationShared::BeginAccess(GLenum mode) { … }
void ExternalVkImageGLRepresentationShared::EndAccess() { … }
ExternalVkImageGLRepresentation::ExternalVkImageGLRepresentation(
SharedImageManager* manager,
SharedImageBacking* backing,
MemoryTypeTracker* tracker,
std::vector<raw_ptr<gles2::Texture, VectorExperimental>> textures)
: … { … }
ExternalVkImageGLRepresentation::~ExternalVkImageGLRepresentation() = default;
gles2::Texture* ExternalVkImageGLRepresentation::GetTexture(int plane_index) { … }
bool ExternalVkImageGLRepresentation::BeginAccess(GLenum mode) { … }
void ExternalVkImageGLRepresentation::EndAccess() { … }
ExternalVkImageGLPassthroughRepresentation::
ExternalVkImageGLPassthroughRepresentation(
SharedImageManager* manager,
SharedImageBacking* backing,
MemoryTypeTracker* tracker,
std::vector<scoped_refptr<gles2::TexturePassthrough>> textures)
: … { … }
ExternalVkImageGLPassthroughRepresentation::
~ExternalVkImageGLPassthroughRepresentation() = default;
const scoped_refptr<gles2::TexturePassthrough>&
ExternalVkImageGLPassthroughRepresentation::GetTexturePassthrough(
int plane_index) { … }
bool ExternalVkImageGLPassthroughRepresentation::BeginAccess(GLenum mode) { … }
void ExternalVkImageGLPassthroughRepresentation::EndAccess() { … }
}