chromium/ui/gl/gl_gl_api_implementation.cc

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

#include "ui/gl/gl_gl_api_implementation.h"

#include <array>
#include <vector>

#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_state_restorer.h"
#include "ui/gl/gl_surface.h"
#include "ui/gl/gl_switches.h"
#include "ui/gl/gl_version_info.h"
#include "ui/gl/shader_tracking.h"

namespace gl {

// The GL state for when no context is bound
static CurrentGL* g_no_context_current_gl =;

// If the null draw bindings are currently enabled.
// TODO: Consider adding a new GLApi that no-ops these functions
static bool g_null_draw_bindings_enabled =;

namespace {

// TODO(epenner): Could the above function be merged into GetInternalFormat and
// removed?
static inline GLenum GetTexInternalFormat(const GLVersionInfo* version,
                                          GLenum internal_format,
                                          GLenum format,
                                          GLenum type) {}

static inline GLenum GetTexFormat(const GLVersionInfo* version, GLenum format) {}

static inline GLenum GetPixelType(const GLVersionInfo* version,
                                  GLenum type,
                                  GLenum format) {}

}  // anonymous namespace

GLenum GetInternalFormat(const GLVersionInfo* version, GLenum internal_format) {}

void InitializeStaticGLBindingsGL() {}

CurrentGL*& ThreadLocalCurrentGL() {}

CurrentGL* GetThreadLocalCurrentGL() {}

void SetThreadLocalCurrentGL(CurrentGL* current) {}

void ClearBindingsGL() {}

bool SetNullDrawGLBindingsEnabled(bool enabled) {}

bool GetNullDrawBindingsEnabled() {}

GLApi::GLApi() = default;

GLApi::~GLApi() = default;

GLApiBase::GLApiBase() :{}

GLApiBase::~GLApiBase() = default;

void GLApiBase::InitializeBase(DriverGL* driver) {}

RealGLApi::RealGLApi()
    :{}

RealGLApi::~RealGLApi() = default;

void RealGLApi::Initialize(DriverGL* driver) {}

void RealGLApi::glGetIntegervFn(GLenum pname, GLint* params) {}

const GLubyte* RealGLApi::glGetStringFn(GLenum name) {}

const GLubyte* RealGLApi::glGetStringiFn(GLenum name, GLuint index) {}

void RealGLApi::glTexImage2DFn(GLenum target,
                               GLint level,
                               GLint internalformat,
                               GLsizei width,
                               GLsizei height,
                               GLint border,
                               GLenum format,
                               GLenum type,
                               const void* pixels) {}

void RealGLApi::glTexSubImage2DFn(GLenum target,
                                  GLint level,
                                  GLint xoffset,
                                  GLint yoffset,
                                  GLsizei width,
                                  GLsizei height,
                                  GLenum format,
                                  GLenum type,
                                  const void* pixels) {}

void RealGLApi::glTexStorage2DEXTFn(GLenum target,
                                    GLsizei levels,
                                    GLenum internalformat,
                                    GLsizei width,
                                    GLsizei height) {}

void RealGLApi::glTexStorageMem2DEXTFn(GLenum target,
                                       GLsizei levels,
                                       GLenum internalformat,
                                       GLsizei width,
                                       GLsizei height,
                                       GLuint memory,
                                       GLuint64 offset) {}

void RealGLApi::glTexStorageMemFlags2DANGLEFn(
    GLenum target,
    GLsizei levels,
    GLenum internalformat,
    GLsizei width,
    GLsizei height,
    GLuint memory,
    GLuint64 offset,
    GLbitfield createFlags,
    GLbitfield usageFlags,
    const void* imageCreateInfoPNext) {}

void RealGLApi::glRenderbufferStorageEXTFn(GLenum target,
                                           GLenum internalformat,
                                           GLsizei width,
                                           GLsizei height) {}

// The ANGLE and IMG variants of glRenderbufferStorageMultisample currently do
// not support BGRA render buffers so only the EXT one is customized. If
// GL_CHROMIUM_renderbuffer_format_BGRA8888 support is added to ANGLE then the
// ANGLE version should also be customized.
void RealGLApi::glRenderbufferStorageMultisampleEXTFn(GLenum target,
                                                      GLsizei samples,
                                                      GLenum internalformat,
                                                      GLsizei width,
                                                      GLsizei height) {}

void RealGLApi::glRenderbufferStorageMultisampleFn(GLenum target,
                                                   GLsizei samples,
                                                   GLenum internalformat,
                                                   GLsizei width,
                                                   GLsizei height) {}

void RealGLApi::glReadPixelsFn(GLint x,
                               GLint y,
                               GLsizei width,
                               GLsizei height,
                               GLenum format,
                               GLenum type,
                               void* pixels) {}

void RealGLApi::glClearFn(GLbitfield mask) {}

void RealGLApi::glDrawArraysFn(GLenum mode, GLint first, GLsizei count) {}

void RealGLApi::glDrawElementsFn(GLenum mode,
                                 GLsizei count,
                                 GLenum type,
                                 const void* indices) {}

void RealGLApi::glClearDepthFn(GLclampd depth) {}

void RealGLApi::glDepthRangeFn(GLclampd z_near, GLclampd z_far) {}

void RealGLApi::glUseProgramFn(GLuint program) {}

void RealGLApi::InitializeFilteredExtensionsIfNeeded() {}

void RealGLApi::SetDisabledExtensions(const std::string& disabled_extensions) {}

void RealGLApi::ClearCachedGLExtensions() {}

void RealGLApi::set_version(std::unique_ptr<GLVersionInfo> version) {}

TraceGLApi::~TraceGLApi() = default;

LogGLApi::LogGLApi(GLApi* gl_api) :{}

LogGLApi::~LogGLApi() = default;

NoContextGLApi::NoContextGLApi() = default;

NoContextGLApi::~NoContextGLApi() = default;

}  // namespace gl