chromium/third_party/angle/src/libANGLE/angletypes.cpp

//
// Copyright 2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

// angletypes.h : Defines a variety of structures and enum types that are used throughout libGLESv2

#include "libANGLE/angletypes.h"
#include "libANGLE/Program.h"
#include "libANGLE/State.h"
#include "libANGLE/VertexArray.h"
#include "libANGLE/VertexAttribute.h"

#include <limits>

#define USE_SYSTEM_ZLIB
#include "compression_utils_portable.h"

namespace gl
{
namespace
{
bool IsStencilNoOp(GLenum stencilFunc,
                   GLenum stencilFail,
                   GLenum stencilPassDepthFail,
                   GLenum stencilPassDepthPass)
{}

// Calculate whether the range [outsideLow, outsideHigh] encloses the range [insideLow, insideHigh]
bool EnclosesRange(int outsideLow, int outsideHigh, int insideLow, int insideHigh)
{}

bool IsAdvancedBlendEquation(gl::BlendEquationType blendEquation)
{}

bool IsExtendedBlendFactor(gl::BlendFactorType blendFactor)
{}
}  // anonymous namespace

RasterizerState::RasterizerState()
{}

RasterizerState::RasterizerState(const RasterizerState &other)
{}

RasterizerState &RasterizerState::operator=(const RasterizerState &other)
{}

bool operator==(const RasterizerState &a, const RasterizerState &b)
{}

bool operator!=(const RasterizerState &a, const RasterizerState &b)
{}

BlendState::BlendState()
{}

BlendState::BlendState(const BlendState &other)
{}

bool operator==(const BlendState &a, const BlendState &b)
{}

bool operator!=(const BlendState &a, const BlendState &b)
{}

DepthStencilState::DepthStencilState()
{}

DepthStencilState::DepthStencilState(const DepthStencilState &other)
{}

DepthStencilState &DepthStencilState::operator=(const DepthStencilState &other)
{}

bool DepthStencilState::isDepthMaskedOut() const
{}

bool DepthStencilState::isStencilMaskedOut() const
{}

bool DepthStencilState::isStencilNoOp() const
{}

bool DepthStencilState::isStencilBackNoOp() const
{}

bool operator==(const DepthStencilState &a, const DepthStencilState &b)
{}

bool operator!=(const DepthStencilState &a, const DepthStencilState &b)
{}

SamplerState::SamplerState()
{}

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

SamplerState &SamplerState::operator=(const SamplerState &other) = default;

// static
SamplerState SamplerState::CreateDefaultForTarget(TextureType type)
{}

bool SamplerState::setMinFilter(GLenum minFilter)
{}

bool SamplerState::setMagFilter(GLenum magFilter)
{}

bool SamplerState::setWrapS(GLenum wrapS)
{}

bool SamplerState::setWrapT(GLenum wrapT)
{}

bool SamplerState::setWrapR(GLenum wrapR)
{}

bool SamplerState::setMaxAnisotropy(float maxAnisotropy)
{}

bool SamplerState::setMinLod(GLfloat minLod)
{}

bool SamplerState::setMaxLod(GLfloat maxLod)
{}

bool SamplerState::setCompareMode(GLenum compareMode)
{}

bool SamplerState::setCompareFunc(GLenum compareFunc)
{}

bool SamplerState::setSRGBDecode(GLenum sRGBDecode)
{}

bool SamplerState::setBorderColor(const ColorGeneric &color)
{}

void SamplerState::updateWrapTCompareMode()
{}

ImageUnit::ImageUnit()
    :{}

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

ImageUnit::~ImageUnit() = default;

BlendStateExt::BlendStateExt(const size_t drawBufferCount)
    :{}

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

BlendStateExt &BlendStateExt::operator=(const BlendStateExt &other) = default;

void BlendStateExt::setEnabled(const bool enabled)
{}

void BlendStateExt::setEnabledIndexed(const size_t index, const bool enabled)
{}

BlendStateExt::ColorMaskStorage::Type BlendStateExt::expandColorMaskValue(const bool red,
                                                                          const bool green,
                                                                          const bool blue,
                                                                          const bool alpha) const
{}

BlendStateExt::ColorMaskStorage::Type BlendStateExt::expandColorMaskIndexed(
    const size_t index) const
{}

void BlendStateExt::setColorMask(const bool red,
                                 const bool green,
                                 const bool blue,
                                 const bool alpha)
{}

void BlendStateExt::setColorMaskIndexed(const size_t index, const uint8_t value)
{}

void BlendStateExt::setColorMaskIndexed(const size_t index,
                                        const bool red,
                                        const bool green,
                                        const bool blue,
                                        const bool alpha)
{}

uint8_t BlendStateExt::getColorMaskIndexed(const size_t index) const
{}

void BlendStateExt::getColorMaskIndexed(const size_t index,
                                        bool *red,
                                        bool *green,
                                        bool *blue,
                                        bool *alpha) const
{}

DrawBufferMask BlendStateExt::compareColorMask(ColorMaskStorage::Type other) const
{}

BlendStateExt::EquationStorage::Type BlendStateExt::expandEquationValue(const GLenum mode) const
{}

BlendStateExt::EquationStorage::Type BlendStateExt::expandEquationValue(
    const gl::BlendEquationType equation) const
{}

BlendStateExt::EquationStorage::Type BlendStateExt::expandEquationColorIndexed(
    const size_t index) const
{}

BlendStateExt::EquationStorage::Type BlendStateExt::expandEquationAlphaIndexed(
    const size_t index) const
{}

void BlendStateExt::setEquations(const GLenum modeColor, const GLenum modeAlpha)
{}

void BlendStateExt::setEquationsIndexed(const size_t index,
                                        const GLenum modeColor,
                                        const GLenum modeAlpha)
{}

void BlendStateExt::setEquationsIndexed(const size_t index,
                                        const size_t sourceIndex,
                                        const BlendStateExt &source)
{}

DrawBufferMask BlendStateExt::compareEquations(const EquationStorage::Type color,
                                               const EquationStorage::Type alpha) const
{}

BlendStateExt::FactorStorage::Type BlendStateExt::expandFactorValue(const GLenum func) const
{}

BlendStateExt::FactorStorage::Type BlendStateExt::expandFactorValue(
    const gl::BlendFactorType func) const
{}

BlendStateExt::FactorStorage::Type BlendStateExt::expandSrcColorIndexed(const size_t index) const
{}

BlendStateExt::FactorStorage::Type BlendStateExt::expandDstColorIndexed(const size_t index) const
{}

BlendStateExt::FactorStorage::Type BlendStateExt::expandSrcAlphaIndexed(const size_t index) const
{}

BlendStateExt::FactorStorage::Type BlendStateExt::expandDstAlphaIndexed(const size_t index) const
{}

void BlendStateExt::setFactors(const GLenum srcColor,
                               const GLenum dstColor,
                               const GLenum srcAlpha,
                               const GLenum dstAlpha)
{}

void BlendStateExt::setFactorsIndexed(const size_t index,
                                      const gl::BlendFactorType srcColorFactor,
                                      const gl::BlendFactorType dstColorFactor,
                                      const gl::BlendFactorType srcAlphaFactor,
                                      const gl::BlendFactorType dstAlphaFactor)
{}

void BlendStateExt::setFactorsIndexed(const size_t index,
                                      const GLenum srcColor,
                                      const GLenum dstColor,
                                      const GLenum srcAlpha,
                                      const GLenum dstAlpha)
{}

void BlendStateExt::setFactorsIndexed(const size_t index,
                                      const size_t sourceIndex,
                                      const BlendStateExt &source)
{}

DrawBufferMask BlendStateExt::compareFactors(const FactorStorage::Type srcColor,
                                             const FactorStorage::Type dstColor,
                                             const FactorStorage::Type srcAlpha,
                                             const FactorStorage::Type dstAlpha) const
{}

static void MinMax(int a, int b, int *minimum, int *maximum)
{}

template <>
bool RectangleImpl<int>::empty() const
{}

template <>
bool RectangleImpl<float>::empty() const
{}

bool ClipRectangle(const Rectangle &source, const Rectangle &clip, Rectangle *intersection)
{}

void GetEnclosingRectangle(const Rectangle &rect1, const Rectangle &rect2, Rectangle *rectUnion)
{}

void ExtendRectangle(const Rectangle &source, const Rectangle &extend, Rectangle *extended)
{}

bool Box::valid() const
{}

bool Box::operator==(const Box &other) const
{}

bool Box::operator!=(const Box &other) const
{}

Rectangle Box::toRect() const
{}

bool Box::coversSameExtent(const Extents &size) const
{}

bool Box::contains(const Box &other) const
{}

size_t Box::volume() const
{}

void Box::extend(const Box &other)
{}

bool operator==(const Offset &a, const Offset &b)
{}

bool operator!=(const Offset &a, const Offset &b)
{}

bool operator==(const Extents &lhs, const Extents &rhs)
{}

bool operator!=(const Extents &lhs, const Extents &rhs)
{}

bool ValidateComponentTypeMasks(unsigned long outputTypes,
                                unsigned long inputTypes,
                                unsigned long outputMask,
                                unsigned long inputMask)
{}

GLsizeiptr GetBoundBufferAvailableSize(const OffsetBindingPointer<Buffer> &binding)
{}

}  // namespace gl
   //
namespace angle
{
bool CompressBlob(const size_t cacheSize, const uint8_t *cacheData, MemoryBuffer *compressedData)
{}

bool DecompressBlob(const uint8_t *compressedData,
                    const size_t compressedSize,
                    size_t maxUncompressedDataSize,
                    MemoryBuffer *uncompressedData)
{}

uint32_t GenerateCRC32(const uint8_t *data, size_t size)
{}

UnlockedTailCall::UnlockedTailCall() = default;

UnlockedTailCall::~UnlockedTailCall()
{}

void UnlockedTailCall::add(CallType &&call)
{}

void UnlockedTailCall::runImpl(void *resultOut)
{}
}  // namespace angle