chromium/third_party/angle/src/libANGLE/ResourceManager.cpp

//
// Copyright 2002 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

// ResourceManager.cpp: Implements the the ResourceManager classes, which handle allocation and
// lifetime of GL objects.

#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)
{}

}  // anonymous namespace

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 Implementation.
BufferManager::~BufferManager() = default;

// static
Buffer *BufferManager::AllocateNewObject(rx::GLImplFactory *factory, BufferID handle)
{}

// static
void BufferManager::DeleteObject(const Context *context, Buffer *buffer)
{}

BufferID BufferManager::createBuffer()
{}

Buffer *BufferManager::getBuffer(BufferID handle) const
{}

// ShaderProgramManager Implementation.

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 Implementation.

TextureManager::~TextureManager() = default;

// static
Texture *TextureManager::AllocateNewObject(rx::GLImplFactory *factory,
                                           TextureID handle,
                                           TextureType type)
{}

// static
void TextureManager::DeleteObject(const Context *context, Texture *texture)
{}

TextureID TextureManager::createTexture()
{}

void TextureManager::signalAllTexturesDirty() const
{}

void TextureManager::enableHandleAllocatorLogging()
{}

// RenderbufferManager Implementation.

RenderbufferManager::~RenderbufferManager() = default;

// static
Renderbuffer *RenderbufferManager::AllocateNewObject(rx::GLImplFactory *factory,
                                                     RenderbufferID handle)
{}

// static
void RenderbufferManager::DeleteObject(const Context *context, Renderbuffer *renderbuffer)
{}

RenderbufferID RenderbufferManager::createRenderbuffer()
{}

Renderbuffer *RenderbufferManager::getRenderbuffer(RenderbufferID handle) const
{}

// SamplerManager Implementation.

SamplerManager::~SamplerManager() = default;

// static
Sampler *SamplerManager::AllocateNewObject(rx::GLImplFactory *factory, SamplerID handle)
{}

// static
void SamplerManager::DeleteObject(const Context *context, Sampler *sampler)
{}

SamplerID SamplerManager::createSampler()
{}

Sampler *SamplerManager::getSampler(SamplerID handle) const
{}

bool SamplerManager::isSampler(SamplerID sampler) const
{}

// SyncManager Implementation.

SyncManager::~SyncManager() = default;

// static
void SyncManager::DeleteObject(const Context *context, Sync *sync)
{}

SyncID SyncManager::createSync(rx::GLImplFactory *factory)
{}

Sync *SyncManager::getSync(SyncID handle) const
{}

// FramebufferManager Implementation.

FramebufferManager::~FramebufferManager() = default;

// static
Framebuffer *FramebufferManager::AllocateNewObject(rx::GLImplFactory *factory,
                                                   FramebufferID handle,
                                                   const Context *context)
{}

// static
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 Implementation.

ProgramPipelineManager::~ProgramPipelineManager() = default;

// static
ProgramPipeline *ProgramPipelineManager::AllocateNewObject(rx::GLImplFactory *factory,
                                                           ProgramPipelineID handle)
{}

// static
void ProgramPipelineManager::DeleteObject(const Context *context, ProgramPipeline *pipeline)
{}

ProgramPipelineID ProgramPipelineManager::createProgramPipeline()
{}

ProgramPipeline *ProgramPipelineManager::getProgramPipeline(ProgramPipelineID handle) const
{}

// MemoryObjectManager Implementation.

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 Implementation.

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
{}
}  // namespace gl