chromium/gpu/skia_bindings/gles2_implementation_with_grcontext_support.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "gpu/skia_bindings/gles2_implementation_with_grcontext_support.h"

#include <utility>

#include "gpu/skia_bindings/grcontext_for_gles2_interface.h"
#include "third_party/khronos/GLES2/gl2ext.h"
#include "third_party/skia/include/gpu/GrDirectContext.h"

namespace skia_bindings {

GLES2ImplementationWithGrContextSupport::
    GLES2ImplementationWithGrContextSupport(
        gpu::gles2::GLES2CmdHelper* helper,
        scoped_refptr<gpu::gles2::ShareGroup> share_group,
        gpu::TransferBufferInterface* transfer_buffer,
        bool bind_generates_resource,
        bool lose_context_when_out_of_memory,
        bool support_client_side_arrays,
        gpu::GpuControl* gpu_control)
    :{}

GLES2ImplementationWithGrContextSupport::
    ~GLES2ImplementationWithGrContextSupport() {}

bool GLES2ImplementationWithGrContextSupport::HasGrContextSupport() const {}

void GLES2ImplementationWithGrContextSupport::ResetGrContextIfNeeded(
    uint32_t dirty_bits) {}

void GLES2ImplementationWithGrContextSupport::SetGrContext(
    GrDirectContext* gr) {}

void GLES2ImplementationWithGrContextSupport::WillCallGLFromSkia() {}

void GLES2ImplementationWithGrContextSupport::DidCallGLFromSkia() {}

// Calls that invalidate kRenderTarget_GrGLBackendState
void GLES2ImplementationWithGrContextSupport::BindFramebuffer(
    GLenum target,
    GLuint framebuffer) {}
void GLES2ImplementationWithGrContextSupport::BindRenderbuffer(
    GLenum target,
    GLuint renderbuffer) {}
void GLES2ImplementationWithGrContextSupport::DiscardFramebufferEXT(
    GLenum target,
    GLsizei count,
    const GLenum* attachments) {}
void GLES2ImplementationWithGrContextSupport::DeleteFramebuffers(
    GLsizei n,
    const GLuint* framebuffers) {}
void GLES2ImplementationWithGrContextSupport::DeleteRenderbuffers(
    GLsizei n,
    const GLuint* renderbuffers) {}
void GLES2ImplementationWithGrContextSupport::FramebufferTexture2D(
    GLenum target,
    GLenum attachment,
    GLenum textarget,
    GLuint texture,
    GLint level) {}
void GLES2ImplementationWithGrContextSupport::FramebufferTextureLayer(
    GLenum target,
    GLenum attachment,
    GLuint texture,
    GLint level,
    GLint layer) {}

// Calls that invalidate kTextureBinding_GrGLBackendState
void GLES2ImplementationWithGrContextSupport::BindTexture(GLenum target,
                                                          GLuint texture) {}
void GLES2ImplementationWithGrContextSupport::UnlockDiscardableTextureCHROMIUM(
    GLuint texture) {}
bool GLES2ImplementationWithGrContextSupport::LockDiscardableTextureCHROMIUM(
    GLuint texture) {}
void GLES2ImplementationWithGrContextSupport::DeleteTextures(
    GLsizei n,
    const GLuint* textures) {}
void GLES2ImplementationWithGrContextSupport::ActiveTexture(GLenum texture) {}

// Calls that invalidate kView_GrGLBackendState
void GLES2ImplementationWithGrContextSupport::Scissor(GLint x,
                                                      GLint y,
                                                      GLsizei width,
                                                      GLsizei height) {}
void GLES2ImplementationWithGrContextSupport::Viewport(GLint x,
                                                       GLint y,
                                                       GLsizei width,
                                                       GLsizei height) {}
void GLES2ImplementationWithGrContextSupport::WindowRectanglesEXT(
    GLenum mode,
    GLsizei count,
    const GLint* box) {}

// Calls that invalidate kBlend_GrGLBackendState
void GLES2ImplementationWithGrContextSupport::BlendColor(GLclampf red,
                                                         GLclampf green,
                                                         GLclampf blue,
                                                         GLclampf alpha) {}
void GLES2ImplementationWithGrContextSupport::BlendEquation(GLenum mode) {}
void GLES2ImplementationWithGrContextSupport::BlendEquationSeparate(
    GLenum modeRGB,
    GLenum modeAlpha) {}
void GLES2ImplementationWithGrContextSupport::BlendFunc(GLenum sfactor,
                                                        GLenum dfactor) {}
void GLES2ImplementationWithGrContextSupport::BlendFuncSeparate(
    GLenum srcRGB,
    GLenum dstRGB,
    GLenum srcAlpha,
    GLenum dstAlpha) {}

// Calls that invalidate kVertex_GrGLBackendState
void GLES2ImplementationWithGrContextSupport::BindVertexArrayOES(GLuint array) {}
void GLES2ImplementationWithGrContextSupport::DeleteVertexArraysOES(
    GLsizei n,
    const GLuint* arrays) {}
void GLES2ImplementationWithGrContextSupport::VertexAttribDivisorANGLE(
    GLuint index,
    GLuint divisor) {}
void GLES2ImplementationWithGrContextSupport::DisableVertexAttribArray(
    GLuint index) {}
void GLES2ImplementationWithGrContextSupport::EnableVertexAttribArray(
    GLuint index) {}
void GLES2ImplementationWithGrContextSupport::VertexAttrib1f(GLuint indx,
                                                             GLfloat x) {}
void GLES2ImplementationWithGrContextSupport::VertexAttrib1fv(
    GLuint indx,
    const GLfloat* values) {}
void GLES2ImplementationWithGrContextSupport::VertexAttrib2f(GLuint indx,
                                                             GLfloat x,
                                                             GLfloat y) {}
void GLES2ImplementationWithGrContextSupport::VertexAttrib2fv(
    GLuint indx,
    const GLfloat* values) {}
void GLES2ImplementationWithGrContextSupport::VertexAttrib3f(GLuint indx,
                                                             GLfloat x,
                                                             GLfloat y,
                                                             GLfloat z) {}
void GLES2ImplementationWithGrContextSupport::VertexAttrib3fv(
    GLuint indx,
    const GLfloat* values) {}
void GLES2ImplementationWithGrContextSupport::VertexAttrib4f(GLuint indx,
                                                             GLfloat x,
                                                             GLfloat y,
                                                             GLfloat z,
                                                             GLfloat w) {}
void GLES2ImplementationWithGrContextSupport::VertexAttrib4fv(
    GLuint indx,
    const GLfloat* values) {}
void GLES2ImplementationWithGrContextSupport::VertexAttribI4i(GLuint indx,
                                                              GLint x,
                                                              GLint y,
                                                              GLint z,
                                                              GLint w) {}
void GLES2ImplementationWithGrContextSupport::VertexAttribI4iv(
    GLuint indx,
    const GLint* values) {}
void GLES2ImplementationWithGrContextSupport::VertexAttribI4ui(GLuint indx,
                                                               GLuint x,
                                                               GLuint y,
                                                               GLuint z,
                                                               GLuint w) {}
void GLES2ImplementationWithGrContextSupport::VertexAttribI4uiv(
    GLuint indx,
    const GLuint* values) {}
void GLES2ImplementationWithGrContextSupport::VertexAttribIPointer(
    GLuint indx,
    GLint size,
    GLenum type,
    GLsizei stride,
    const void* ptr) {}
void GLES2ImplementationWithGrContextSupport::VertexAttribPointer(
    GLuint indx,
    GLint size,
    GLenum type,
    GLboolean normalized,
    GLsizei stride,
    const void* ptr) {}

// Calls that invalidate kStencil_GrGLBackendState
void GLES2ImplementationWithGrContextSupport::StencilFunc(GLenum func,
                                                          GLint ref,
                                                          GLuint mask) {}
void GLES2ImplementationWithGrContextSupport::StencilFuncSeparate(GLenum face,
                                                                  GLenum func,
                                                                  GLint ref,
                                                                  GLuint mask) {}
void GLES2ImplementationWithGrContextSupport::StencilMask(GLuint mask) {}
void GLES2ImplementationWithGrContextSupport::StencilMaskSeparate(GLenum face,
                                                                  GLuint mask) {}
void GLES2ImplementationWithGrContextSupport::StencilOp(GLenum fail,
                                                        GLenum zfail,
                                                        GLenum zpass) {}
void GLES2ImplementationWithGrContextSupport::StencilOpSeparate(GLenum face,
                                                                GLenum fail,
                                                                GLenum zfail,
                                                                GLenum zpass) {}

// Calls that invalidate kPixelStore_GrGLBackendState
void GLES2ImplementationWithGrContextSupport::PixelStorei(GLenum pname,
                                                          GLint param) {}

// Calls that invalidate kProgram_GrGLBackendState
void GLES2ImplementationWithGrContextSupport::UseProgram(GLuint program) {}

// Calls that invalidate kMisc_GrGLBackendState
void GLES2ImplementationWithGrContextSupport::DepthMask(GLboolean flag) {}
void GLES2ImplementationWithGrContextSupport::FrontFace(GLenum mode) {}
void GLES2ImplementationWithGrContextSupport::LineWidth(GLfloat width) {}
void GLES2ImplementationWithGrContextSupport::ColorMask(GLboolean red,
                                                        GLboolean green,
                                                        GLboolean blue,
                                                        GLboolean alpha) {}

// Calls that invalidate many flags
void GLES2ImplementationWithGrContextSupport::BindBuffer(GLenum target,
                                                         GLuint buffer) {}
void GLES2ImplementationWithGrContextSupport::BindBufferBase(GLenum target,
                                                             GLuint index,
                                                             GLuint buffer) {}
void GLES2ImplementationWithGrContextSupport::BindBufferRange(GLenum target,
                                                              GLuint index,
                                                              GLuint buffer,
                                                              GLintptr offset,
                                                              GLsizeiptr size) {}
void GLES2ImplementationWithGrContextSupport::WillBindBuffer(GLenum target) {}
void GLES2ImplementationWithGrContextSupport::DeleteBuffers(
    GLsizei n,
    const GLuint* buffers) {}

void GLES2ImplementationWithGrContextSupport::Disable(GLenum cap) {}

void GLES2ImplementationWithGrContextSupport::Enable(GLenum cap) {}

void GLES2ImplementationWithGrContextSupport::WillEnableOrDisable(GLenum cap) {}

}  // namespace skia_bindings