summaryrefslogtreecommitdiffstats
path: root/gfx/angle/checkout/src/libANGLE/renderer/RenderbufferImpl.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /gfx/angle/checkout/src/libANGLE/renderer/RenderbufferImpl.h
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/angle/checkout/src/libANGLE/renderer/RenderbufferImpl.h')
-rw-r--r--gfx/angle/checkout/src/libANGLE/renderer/RenderbufferImpl.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/gfx/angle/checkout/src/libANGLE/renderer/RenderbufferImpl.h b/gfx/angle/checkout/src/libANGLE/renderer/RenderbufferImpl.h
new file mode 100644
index 0000000000..11ad88cb75
--- /dev/null
+++ b/gfx/angle/checkout/src/libANGLE/renderer/RenderbufferImpl.h
@@ -0,0 +1,63 @@
+//
+// Copyright (c) 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.
+//
+
+// RenderbufferImpl.h: Defines the abstract class gl::RenderbufferImpl
+
+#ifndef LIBANGLE_RENDERER_RENDERBUFFERIMPL_H_
+#define LIBANGLE_RENDERER_RENDERBUFFERIMPL_H_
+
+#include "angle_gl.h"
+#include "common/angleutils.h"
+#include "libANGLE/Error.h"
+#include "libANGLE/renderer/FramebufferAttachmentObjectImpl.h"
+
+namespace gl
+{
+class RenderbufferState;
+} // namespace gl
+
+namespace egl
+{
+class Image;
+} // namespace egl
+
+namespace rx
+{
+
+class RenderbufferImpl : public FramebufferAttachmentObjectImpl
+{
+ public:
+ RenderbufferImpl(const gl::RenderbufferState &state) : mState(state) {}
+ ~RenderbufferImpl() override {}
+ virtual void onDestroy(const gl::Context *context) {}
+
+ virtual angle::Result setStorage(const gl::Context *context,
+ GLenum internalformat,
+ size_t width,
+ size_t height) = 0;
+ virtual angle::Result setStorageMultisample(const gl::Context *context,
+ size_t samples,
+ GLenum internalformat,
+ size_t width,
+ size_t height) = 0;
+ virtual angle::Result setStorageEGLImageTarget(const gl::Context *context,
+ egl::Image *image) = 0;
+
+ // Override if accurate native memory size information is available
+ virtual GLint getMemorySize() const;
+
+ protected:
+ const gl::RenderbufferState &mState;
+};
+
+inline GLint RenderbufferImpl::getMemorySize() const
+{
+ return 0;
+}
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_RENDERBUFFERIMPL_H_