chromium/gpu/command_buffer/service/context_state.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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "gpu/command_buffer/service/context_state.h"

#include <stddef.h>

#include <algorithm>
#include <cmath>
#include <optional>

#include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "gpu/command_buffer/service/buffer_manager.h"
#include "gpu/command_buffer/service/framebuffer_manager.h"
#include "gpu/command_buffer/service/program_manager.h"
#include "gpu/command_buffer/service/renderbuffer_manager.h"
#include "gpu/command_buffer/service/transform_feedback_manager.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_version_info.h"

namespace gpu {
namespace gles2 {

namespace {

GLuint Get2dServiceId(const TextureUnit& unit) {}

GLuint Get2dArrayServiceId(const TextureUnit& unit) {}

GLuint Get3dServiceId(const TextureUnit& unit) {}

GLuint GetCubeServiceId(const TextureUnit& unit) {}

GLuint GetOesServiceId(const TextureUnit& unit) {}

GLuint GetArbServiceId(const TextureUnit& unit) {}

GLuint GetServiceId(const TextureUnit& unit, GLuint target) {}

bool TargetIsSupported(const FeatureInfo* feature_info, GLuint target) {}

GLuint GetBufferId(const Buffer* buffer) {}

}  // anonymous namespace.

TextureUnit::TextureUnit() :{}

TextureUnit::TextureUnit(const TextureUnit& other) = default;

TextureUnit::~TextureUnit() = default;

bool Vec4::Equal(const Vec4& other) const {}

template <>
void Vec4::GetValues<GLfloat>(GLfloat* values) const {}

template <>
void Vec4::GetValues<GLint>(GLint* values) const {}

template <>
void Vec4::GetValues<GLuint>(GLuint* values) const {}

template <>
void Vec4::SetValues<GLfloat>(const GLfloat* values) {}

template <>
void Vec4::SetValues<GLint>(const GLint* values) {}

template <>
void Vec4::SetValues<GLuint>(const GLuint* values) {}

ContextState::ContextState(FeatureInfo* feature_info,
                           bool track_texture_and_sampler_units)
    :{}

ContextState::~ContextState() = default;

void ContextState::SetLineWidthBounds(GLfloat min, GLfloat max) {}

void ContextState::RestoreTextureUnitBindings(
    GLuint unit,
    const ContextState* prev_state) const {}  // namespace gles2

void ContextState::RestoreSamplerBinding(GLuint unit,
                                         const ContextState* prev_state) const {}

void ContextState::PushTextureUnpackState() const {}

void ContextState::RestoreUnpackState() const {}

void ContextState::DoLineWidth(GLfloat width) const {}

void ContextState::RestoreBufferBindings() const {}

void ContextState::RestoreRenderbufferBindings() {}

void ContextState::RestoreProgramSettings(
    const ContextState* prev_state,
    bool restore_transform_feedback_bindings) const {}

void ContextState::RestoreIndexedUniformBufferBindings(
    const ContextState* prev_state) {}

void ContextState::RestoreActiveTexture() const {}

void ContextState::RestoreAllTextureUnitAndSamplerBindings(
    const ContextState* prev_state) const {}

void ContextState::RestoreActiveTextureUnitBinding(unsigned int target) const {}

void ContextState::RestoreVertexAttribValues() const {}

void ContextState::RestoreVertexAttribArrays(
    const scoped_refptr<VertexAttribManager> attrib_manager) const {}

void ContextState::RestoreVertexAttribs(const ContextState* prev_state) const {}

void ContextState::RestoreGlobalState(const ContextState* prev_state) const {}

void ContextState::RestoreState(const ContextState* prev_state) {}

void ContextState::EnableDisable(GLenum pname, bool enable) const {}

void ContextState::UpdatePackParameters() const {}

void ContextState::SetMaxWindowRectangles(size_t max) {}

size_t ContextState::GetMaxWindowRectangles() const {}

void ContextState::SetWindowRectangles(GLenum mode,
                                       size_t count,
                                       const volatile GLint* box) {}

void ContextState::UpdateWindowRectangles() const {}

void ContextState::UpdateWindowRectanglesForBoundDrawFramebufferClientID(
    GLuint client_id) {}

void ContextState::UpdateUnpackParameters() const {}

void ContextState::SetBoundBuffer(GLenum target, Buffer* buffer) {}

void ContextState::RemoveBoundBuffer(Buffer* buffer) {}

void ContextState::UnbindTexture(TextureRef* texture) {}

void ContextState::UnbindSampler(Sampler* sampler) {}

PixelStoreParams ContextState::GetPackParams() {}

PixelStoreParams ContextState::GetUnpackParams(Dimension dimension) {}

void ContextState::EnableDisableFramebufferSRGB(bool enable) {}

void ContextState::InitStateManual(const ContextState*) const {}

// Include the auto-generated part of this file. We split this because it means
// we can easily edit the non-auto generated parts right here in this file
// instead of having to edit some template or the code generator.
#include "gpu/command_buffer/service/context_state_impl_autogen.h"

}  // namespace gles2
}  // namespace gpu