#include "libANGLE/ResourceManager.h"
#include "libANGLE/Buffer.h"
#include "libANGLE/Context.h"
#include "libANGLE/Fence.h"
#include "libANGLE/MemoryObject.h"
#include "libANGLE/Program.h"
#include "libANGLE/ProgramPipeline.h"
#include "libANGLE/Query.h"
#include "libANGLE/Renderbuffer.h"
#include "libANGLE/Sampler.h"
#include "libANGLE/Semaphore.h"
#include "libANGLE/Shader.h"
#include "libANGLE/Texture.h"
#include "libANGLE/renderer/ContextImpl.h"
namespace gl
{
namespace
{
template <typename ResourceType, typename IDType>
IDType AllocateEmptyObject(HandleAllocator *handleAllocator,
ResourceMap<ResourceType, IDType> *objectMap)
{ … }
}
ResourceManagerBase::ResourceManagerBase() : … { … }
ResourceManagerBase::~ResourceManagerBase() = default;
void ResourceManagerBase::addRef()
{ … }
void ResourceManagerBase::release(const Context *context)
{ … }
template <typename ResourceType, typename ImplT, typename IDType>
TypedResourceManager<ResourceType, ImplT, IDType>::~TypedResourceManager()
{ … }
template <typename ResourceType, typename ImplT, typename IDType>
void TypedResourceManager<ResourceType, ImplT, IDType>::reset(const Context *context)
{ … }
template <typename ResourceType, typename ImplT, typename IDType>
void TypedResourceManager<ResourceType, ImplT, IDType>::deleteObject(const Context *context,
IDType handle)
{ … }
template class TypedResourceManager<Buffer, BufferManager, BufferID>;
template class TypedResourceManager<Texture, TextureManager, TextureID>;
template class TypedResourceManager<Renderbuffer, RenderbufferManager, RenderbufferID>;
template class TypedResourceManager<Sampler, SamplerManager, SamplerID>;
template class TypedResourceManager<Sync, SyncManager, SyncID>;
template class TypedResourceManager<Framebuffer, FramebufferManager, FramebufferID>;
template class TypedResourceManager<ProgramPipeline, ProgramPipelineManager, ProgramPipelineID>;
BufferManager::~BufferManager() = default;
Buffer *BufferManager::AllocateNewObject(rx::GLImplFactory *factory, BufferID handle)
{ … }
void BufferManager::DeleteObject(const Context *context, Buffer *buffer)
{ … }
BufferID BufferManager::createBuffer()
{ … }
Buffer *BufferManager::getBuffer(BufferID handle) const
{ … }
ShaderProgramManager::ShaderProgramManager() { … }
ShaderProgramManager::~ShaderProgramManager()
{ … }
void ShaderProgramManager::reset(const Context *context)
{ … }
ShaderProgramID ShaderProgramManager::createShader(rx::GLImplFactory *factory,
const gl::Limitations &rendererLimitations,
ShaderType type)
{ … }
void ShaderProgramManager::deleteShader(const Context *context, ShaderProgramID shader)
{ … }
Shader *ShaderProgramManager::getShader(ShaderProgramID handle) const
{ … }
ShaderProgramID ShaderProgramManager::createProgram(rx::GLImplFactory *factory)
{ … }
void ShaderProgramManager::deleteProgram(const gl::Context *context, ShaderProgramID program)
{ … }
template <typename ObjectType, typename IDType>
void ShaderProgramManager::deleteObject(const Context *context,
ResourceMap<ObjectType, IDType> *objectMap,
IDType id)
{ … }
TextureManager::~TextureManager() = default;
Texture *TextureManager::AllocateNewObject(rx::GLImplFactory *factory,
TextureID handle,
TextureType type)
{ … }
void TextureManager::DeleteObject(const Context *context, Texture *texture)
{ … }
TextureID TextureManager::createTexture()
{ … }
void TextureManager::signalAllTexturesDirty() const
{ … }
void TextureManager::enableHandleAllocatorLogging()
{ … }
RenderbufferManager::~RenderbufferManager() = default;
Renderbuffer *RenderbufferManager::AllocateNewObject(rx::GLImplFactory *factory,
RenderbufferID handle)
{ … }
void RenderbufferManager::DeleteObject(const Context *context, Renderbuffer *renderbuffer)
{ … }
RenderbufferID RenderbufferManager::createRenderbuffer()
{ … }
Renderbuffer *RenderbufferManager::getRenderbuffer(RenderbufferID handle) const
{ … }
SamplerManager::~SamplerManager() = default;
Sampler *SamplerManager::AllocateNewObject(rx::GLImplFactory *factory, SamplerID handle)
{ … }
void SamplerManager::DeleteObject(const Context *context, Sampler *sampler)
{ … }
SamplerID SamplerManager::createSampler()
{ … }
Sampler *SamplerManager::getSampler(SamplerID handle) const
{ … }
bool SamplerManager::isSampler(SamplerID sampler) const
{ … }
SyncManager::~SyncManager() = default;
void SyncManager::DeleteObject(const Context *context, Sync *sync)
{ … }
SyncID SyncManager::createSync(rx::GLImplFactory *factory)
{ … }
Sync *SyncManager::getSync(SyncID handle) const
{ … }
FramebufferManager::~FramebufferManager() = default;
Framebuffer *FramebufferManager::AllocateNewObject(rx::GLImplFactory *factory,
FramebufferID handle,
const Context *context)
{ … }
void FramebufferManager::DeleteObject(const Context *context, Framebuffer *framebuffer)
{ … }
FramebufferID FramebufferManager::createFramebuffer()
{ … }
Framebuffer *FramebufferManager::getFramebuffer(FramebufferID handle) const
{ … }
void FramebufferManager::setDefaultFramebuffer(Framebuffer *framebuffer)
{ … }
Framebuffer *FramebufferManager::getDefaultFramebuffer() const
{ … }
void FramebufferManager::invalidateFramebufferCompletenessCache() const
{ … }
ProgramPipelineManager::~ProgramPipelineManager() = default;
ProgramPipeline *ProgramPipelineManager::AllocateNewObject(rx::GLImplFactory *factory,
ProgramPipelineID handle)
{ … }
void ProgramPipelineManager::DeleteObject(const Context *context, ProgramPipeline *pipeline)
{ … }
ProgramPipelineID ProgramPipelineManager::createProgramPipeline()
{ … }
ProgramPipeline *ProgramPipelineManager::getProgramPipeline(ProgramPipelineID handle) const
{ … }
MemoryObjectManager::MemoryObjectManager() { … }
MemoryObjectManager::~MemoryObjectManager()
{ … }
void MemoryObjectManager::reset(const Context *context)
{ … }
MemoryObjectID MemoryObjectManager::createMemoryObject(rx::GLImplFactory *factory)
{ … }
void MemoryObjectManager::deleteMemoryObject(const Context *context, MemoryObjectID handle)
{ … }
MemoryObject *MemoryObjectManager::getMemoryObject(MemoryObjectID handle) const
{ … }
SemaphoreManager::SemaphoreManager() { … }
SemaphoreManager::~SemaphoreManager()
{ … }
void SemaphoreManager::reset(const Context *context)
{ … }
SemaphoreID SemaphoreManager::createSemaphore(rx::GLImplFactory *factory)
{ … }
void SemaphoreManager::deleteSemaphore(const Context *context, SemaphoreID handle)
{ … }
Semaphore *SemaphoreManager::getSemaphore(SemaphoreID handle) const
{ … }
}