Remove obsolete Renderbuffer types.

RenderbufferProxySet and FramebufferTextureBindingPointer aren't
necessary any more with our refactored renderbuffer classes and
ownership of attachments by the Framebuffer.

We can also consolidate the FramebufferAttachment and implementation
to a single class, and no longer need to store ref counted objects
in the Framebuffer class directly.

BUG=angle:660

Change-Id: Idcc06dfb42b47242b33494e797a0ba06d6669511
Reviewed-on: https://chromium-review.googlesource.com/201838
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libGLESv2/Framebuffer.h b/src/libGLESv2/Framebuffer.h
index 0c5a8d7..56eb6d919 100644
--- a/src/libGLESv2/Framebuffer.h
+++ b/src/libGLESv2/Framebuffer.h
@@ -22,7 +22,6 @@
 namespace gl
 {
 class FramebufferAttachment;
-class FramebufferAttachmentImpl;
 class Colorbuffer;
 class Depthbuffer;
 class Stencilbuffer;
@@ -43,10 +42,6 @@
     void detachTexture(GLuint texture);
     void detachRenderbuffer(GLuint renderbuffer);
 
-    unsigned int getRenderTargetSerial(unsigned int colorAttachment) const;
-    unsigned int getDepthbufferSerial() const;
-    unsigned int getStencilbufferSerial() const;
-
     FramebufferAttachment *getColorbuffer(unsigned int colorAttachment) const;
     FramebufferAttachment *getDepthbuffer() const;
     FramebufferAttachment *getStencilbuffer() const;
@@ -64,17 +59,17 @@
     GLuint getColorbufferHandle(unsigned int colorAttachment) const;
     GLuint getDepthbufferHandle() const;
     GLuint getStencilbufferHandle() const;
-    GLenum getDepthStencilbufferHandle() const;
+    GLuint getDepthStencilbufferHandle() const;
 
-    GLenum getColorbufferMipLevel(unsigned int colorAttachment) const;
-    GLenum getDepthbufferMipLevel() const;
-    GLenum getStencilbufferMipLevel() const;
-    GLenum getDepthStencilbufferMipLevel() const;
+    GLint getColorbufferMipLevel(unsigned int colorAttachment) const;
+    GLint getDepthbufferMipLevel() const;
+    GLint getStencilbufferMipLevel() const;
+    GLint getDepthStencilbufferMipLevel() const;
 
-    GLenum getColorbufferLayer(unsigned int colorAttachment) const;
-    GLenum getDepthbufferLayer() const;
-    GLenum getStencilbufferLayer() const;
-    GLenum getDepthStencilbufferLayer() const;
+    GLint getColorbufferLayer(unsigned int colorAttachment) const;
+    GLint getDepthbufferLayer() const;
+    GLint getStencilbufferLayer() const;
+    GLint getDepthStencilbufferLayer() const;
 
     GLenum getDrawBufferState(unsigned int colorAttachment) const;
     void setDrawBufferState(unsigned int colorAttachment, GLenum drawBuffer);
@@ -88,19 +83,21 @@
     virtual GLenum completeness() const;
 
   protected:
-    FramebufferTextureBindingPointer<FramebufferAttachment> mColorbuffers[IMPLEMENTATION_MAX_DRAW_BUFFERS];
+    rx::Renderer *mRenderer;
+
+    FramebufferAttachment *mColorbuffers[IMPLEMENTATION_MAX_DRAW_BUFFERS];
     GLenum mDrawBufferStates[IMPLEMENTATION_MAX_DRAW_BUFFERS];
     GLenum mReadBufferState;
 
-    FramebufferTextureBindingPointer<FramebufferAttachment> mDepthbuffer;
-    FramebufferTextureBindingPointer<FramebufferAttachment> mStencilbuffer;
+    FramebufferAttachment *mDepthbuffer;
+    FramebufferAttachment *mStencilbuffer;
 
-    rx::Renderer *mRenderer;
+    bool hasValidDepthStencil() const;
 
-  private:
+private:
     DISALLOW_COPY_AND_ASSIGN(Framebuffer);
 
-    FramebufferAttachmentImpl *createAttachmentImpl(GLenum type, GLuint handle, GLint level, GLint layer) const;
+    FramebufferAttachment *createAttachment(GLenum type, GLuint handle, GLint level, GLint layer) const;
 };
 
 class DefaultFramebuffer : public Framebuffer