#include "third_party/blink/renderer/modules/webgl/webgl_framebuffer.h"
#include "gpu/command_buffer/client/gles2_interface.h"
#include "third_party/blink/renderer/modules/webgl/webgl_renderbuffer.h"
#include "third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h"
#include "third_party/blink/renderer/modules/webgl/webgl_texture.h"
namespace blink {
namespace {
const char kIncompleteOpaque[] = …;
class WebGLRenderbufferAttachment final
: public WebGLFramebuffer::WebGLAttachment { … };
void WebGLRenderbufferAttachment::Trace(Visitor* visitor) const { … }
WebGLRenderbufferAttachment::WebGLRenderbufferAttachment(
WebGLRenderbuffer* renderbuffer)
: … { … }
WebGLSharedObject* WebGLRenderbufferAttachment::Object() const { … }
bool WebGLRenderbufferAttachment::IsSharedObject(
WebGLSharedObject* object) const { … }
bool WebGLRenderbufferAttachment::Valid() const { … }
void WebGLRenderbufferAttachment::OnDetached(gpu::gles2::GLES2Interface* gl) { … }
void WebGLRenderbufferAttachment::Attach(gpu::gles2::GLES2Interface* gl,
GLenum target,
GLenum attachment) { … }
void WebGLRenderbufferAttachment::Unattach(gpu::gles2::GLES2Interface* gl,
GLenum target,
GLenum attachment) { … }
class WebGLTextureAttachment final : public WebGLFramebuffer::WebGLAttachment { … };
void WebGLTextureAttachment::Trace(Visitor* visitor) const { … }
WebGLTextureAttachment::WebGLTextureAttachment(WebGLTexture* texture,
GLenum target,
GLint level,
GLint layer)
: … { … }
WebGLSharedObject* WebGLTextureAttachment::Object() const { … }
bool WebGLTextureAttachment::IsSharedObject(WebGLSharedObject* object) const { … }
bool WebGLTextureAttachment::Valid() const { … }
void WebGLTextureAttachment::OnDetached(gpu::gles2::GLES2Interface* gl) { … }
void WebGLTextureAttachment::Attach(gpu::gles2::GLES2Interface* gl,
GLenum target,
GLenum attachment) { … }
void WebGLTextureAttachment::Unattach(gpu::gles2::GLES2Interface* gl,
GLenum target,
GLenum attachment) { … }
}
WebGLFramebuffer::WebGLAttachment::WebGLAttachment() = default;
WebGLFramebuffer* WebGLFramebuffer::CreateOpaque(WebGLRenderingContextBase* ctx,
bool has_depth,
bool has_stencil) { … }
WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContextBase* ctx, bool opaque)
: … { … }
WebGLFramebuffer::~WebGLFramebuffer() = default;
void WebGLFramebuffer::SetAttachmentForBoundFramebuffer(GLenum target,
GLenum attachment,
GLenum tex_target,
WebGLTexture* texture,
GLint level,
GLint layer,
GLsizei num_views) { … }
void WebGLFramebuffer::SetAttachmentForBoundFramebuffer(
GLenum target,
GLenum attachment,
WebGLRenderbuffer* renderbuffer) { … }
WebGLSharedObject* WebGLFramebuffer::GetAttachmentObject(
GLenum attachment) const { … }
WebGLFramebuffer::WebGLAttachment* WebGLFramebuffer::GetAttachment(
GLenum attachment) const { … }
void WebGLFramebuffer::RemoveAttachmentFromBoundFramebuffer(
GLenum target,
WebGLSharedObject* attachment) { … }
GLenum WebGLFramebuffer::CheckDepthStencilStatus(const char** reason) const { … }
bool WebGLFramebuffer::HasDepthBuffer() const { … }
bool WebGLFramebuffer::HasStencilBuffer() const { … }
void WebGLFramebuffer::DeleteObjectImpl(gpu::gles2::GLES2Interface* gl) { … }
bool WebGLFramebuffer::IsBound(GLenum target) const { … }
void WebGLFramebuffer::DrawBuffers(const Vector<GLenum>& bufs) { … }
void WebGLFramebuffer::DrawBuffersIfNecessary(bool force) { … }
void WebGLFramebuffer::SetAttachmentInternal(GLenum target,
GLenum attachment,
GLenum tex_target,
WebGLTexture* texture,
GLint level,
GLint layer) { … }
void WebGLFramebuffer::SetAttachmentInternal(GLenum target,
GLenum attachment,
WebGLRenderbuffer* renderbuffer) { … }
void WebGLFramebuffer::RemoveAttachmentInternal(GLenum target,
GLenum attachment) { … }
void WebGLFramebuffer::CommitWebGL1DepthStencilIfConsistent(GLenum target) { … }
GLenum WebGLFramebuffer::GetDrawBuffer(GLenum draw_buffer) { … }
constexpr static GLint PlaneKey(GLint plane) { … }
void WebGLFramebuffer::SetPLSTexture(GLint plane, WebGLTexture* texture) { … }
WebGLTexture* WebGLFramebuffer::GetPLSTexture(GLint plane) const { … }
void WebGLFramebuffer::Trace(Visitor* visitor) const { … }
}