Create a DefaultAttachment type and an implementation for it.
This allows for dynamically sized default attachments instead of calling
Context::makeCurrent each time the surface changes size.
BUG=angle:824
Change-Id: Ic39c0d7dc4269db53a34c01c4d915cb1a3cfbd08
Reviewed-on: https://chromium-review.googlesource.com/228180
Tested-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libGLESv2/renderer/FramebufferImpl.h b/src/libGLESv2/renderer/FramebufferImpl.h
new file mode 100644
index 0000000..372da6e
--- /dev/null
+++ b/src/libGLESv2/renderer/FramebufferImpl.h
@@ -0,0 +1,31 @@
+//
+// Copyright 2014 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.
+//
+
+// FramebufferImpl.h: Defines the abstract rx::DefaultAttachmentImpl class.
+
+#ifndef LIBGLESV2_RENDERER_FRAMBUFFERIMPL_H_
+#define LIBGLESV2_RENDERER_FRAMBUFFERIMPL_H_
+
+#include "angle_gl.h"
+
+namespace rx
+{
+
+class DefaultAttachmentImpl
+{
+ public:
+ virtual ~DefaultAttachmentImpl() {};
+
+ virtual GLsizei getWidth() const = 0;
+ virtual GLsizei getHeight() const = 0;
+ virtual GLenum getInternalFormat() const = 0;
+ virtual GLenum getActualFormat() const = 0;
+ virtual GLsizei getSamples() const = 0;
+};
+
+}
+
+#endif // LIBGLESV2_RENDERER_FRAMBUFFERIMPL_H_