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

//
// 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.h : Defines the ResourceManager classes, which handle allocation and lifetime of
// GL objects.

#ifndef LIBANGLE_RESOURCEMANAGER_H_
#define LIBANGLE_RESOURCEMANAGER_H_

#include "angle_gl.h"
#include "common/angleutils.h"
#include "libANGLE/Error.h"
#include "libANGLE/HandleAllocator.h"
#include "libANGLE/ResourceMap.h"

namespace rx
{
class GLImplFactory;
}  // namespace rx

namespace egl
{
class ShareGroup;
}  // namespace egl

namespace gl
{
class Buffer;
struct Caps;
class Context;
class Framebuffer;
struct Limitations;
class MemoryObject;
class Path;
class Program;
class ProgramPipeline;
class Renderbuffer;
class Sampler;
class Semaphore;
class Shader;
class Sync;
class Texture;

class ResourceManagerBase : angle::NonCopyable
{};

template <typename ResourceType, typename ImplT, typename IDType>
class TypedResourceManager : public ResourceManagerBase
{};

class BufferManager : public TypedResourceManager<Buffer, BufferManager, BufferID>
{};

class ShaderProgramManager : public ResourceManagerBase
{};

class TextureManager : public TypedResourceManager<Texture, TextureManager, TextureID>
{};

class RenderbufferManager
    : public TypedResourceManager<Renderbuffer, RenderbufferManager, RenderbufferID>
{};

class SamplerManager : public TypedResourceManager<Sampler, SamplerManager, SamplerID>
{};

class SyncManager : public TypedResourceManager<Sync, SyncManager, SyncID>
{};

class FramebufferManager
    : public TypedResourceManager<Framebuffer, FramebufferManager, FramebufferID>
{};

class ProgramPipelineManager
    : public TypedResourceManager<ProgramPipeline, ProgramPipelineManager, ProgramPipelineID>
{};

class MemoryObjectManager : public ResourceManagerBase
{};

class SemaphoreManager : public ResourceManagerBase
{};
}  // namespace gl

#endif  // LIBANGLE_RESOURCEMANAGER_H_