Add new ref-counted Renderbuffer class.
Renderbuffers are a clear object type in GL, and this patch adds
a more consistent state representation for them. They're managed
by the ResourceManager, and have a storage implementation similar
to Textures, but much simpler.
BUG=angle:660
Change-Id: Ia17199bb8cb570d48db42e1f28ccbcc12a902fcf
Reviewed-on: https://chromium-review.googlesource.com/201834
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
diff --git a/src/libGLESv2/ResourceManager.h b/src/libGLESv2/ResourceManager.h
index a08a6aa..85e6b4b 100644
--- a/src/libGLESv2/ResourceManager.h
+++ b/src/libGLESv2/ResourceManager.h
@@ -30,7 +30,7 @@
class Shader;
class Program;
class Texture;
-class FramebufferAttachment;
+class Renderbuffer;
class Sampler;
class FenceSync;
@@ -63,11 +63,11 @@
Shader *getShader(GLuint handle);
Program *getProgram(GLuint handle);
Texture *getTexture(GLuint handle);
- FramebufferAttachment *getRenderbuffer(GLuint handle);
+ Renderbuffer *getRenderbuffer(GLuint handle);
Sampler *getSampler(GLuint handle);
FenceSync *getFenceSync(GLuint handle);
- void setRenderbuffer(GLuint handle, FramebufferAttachment *renderbuffer);
+ void setRenderbuffer(GLuint handle, Renderbuffer *renderbuffer);
void checkBufferAllocation(unsigned int buffer);
void checkTextureAllocation(GLuint texture, TextureType type);
@@ -97,7 +97,7 @@
TextureMap mTextureMap;
HandleAllocator mTextureHandleAllocator;
- typedef std::unordered_map<GLuint, FramebufferAttachment*> RenderbufferMap;
+ typedef std::unordered_map<GLuint, Renderbuffer*> RenderbufferMap;
RenderbufferMap mRenderbufferMap;
HandleAllocator mRenderbufferHandleAllocator;