chromium/third_party/blink/renderer/modules/webgl/webgl_framebuffer.cc

/*
 * Copyright (C) 2009 Apple Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#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) {}

}  // anonymous namespace

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) {}

// HeapHashMap does not allow keys with a value of 0.
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 {}

}  // namespace blink