#include "common/mathutil.h"
#include "image_util/imageformats.h"
namespace angle
{
namespace priv
{
template <typename T>
static inline T *GetPixel(uint8_t *data, size_t x, size_t y, size_t z, size_t rowPitch, size_t depthPitch)
{ … }
template <typename T>
static inline const T *GetPixel(const uint8_t *data, size_t x, size_t y, size_t z, size_t rowPitch, size_t depthPitch)
{ … }
template <typename T>
static void GenerateMip_Y(size_t sourceWidth, size_t sourceHeight, size_t sourceDepth,
const uint8_t *sourceData, size_t sourceRowPitch, size_t sourceDepthPitch,
size_t destWidth, size_t destHeight, size_t destDepth,
uint8_t *destData, size_t destRowPitch, size_t destDepthPitch)
{ … }
template <typename T>
static void GenerateMip_X(size_t sourceWidth, size_t sourceHeight, size_t sourceDepth,
const uint8_t *sourceData, size_t sourceRowPitch, size_t sourceDepthPitch,
size_t destWidth, size_t destHeight, size_t destDepth,
uint8_t *destData, size_t destRowPitch, size_t destDepthPitch)
{ … }
template <typename T>
static void GenerateMip_Z(size_t sourceWidth, size_t sourceHeight, size_t sourceDepth,
const uint8_t *sourceData, size_t sourceRowPitch, size_t sourceDepthPitch,
size_t destWidth, size_t destHeight, size_t destDepth,
uint8_t *destData, size_t destRowPitch, size_t destDepthPitch)
{ … }
template <typename T>
static void GenerateMip_XY(size_t sourceWidth, size_t sourceHeight, size_t sourceDepth,
const uint8_t *sourceData, size_t sourceRowPitch, size_t sourceDepthPitch,
size_t destWidth, size_t destHeight, size_t destDepth,
uint8_t *destData, size_t destRowPitch, size_t destDepthPitch)
{ … }
template <typename T>
static void GenerateMip_YZ(size_t sourceWidth, size_t sourceHeight, size_t sourceDepth,
const uint8_t *sourceData, size_t sourceRowPitch, size_t sourceDepthPitch,
size_t destWidth, size_t destHeight, size_t destDepth,
uint8_t *destData, size_t destRowPitch, size_t destDepthPitch)
{ … }
template <typename T>
static void GenerateMip_XZ(size_t sourceWidth, size_t sourceHeight, size_t sourceDepth,
const uint8_t *sourceData, size_t sourceRowPitch, size_t sourceDepthPitch,
size_t destWidth, size_t destHeight, size_t destDepth,
uint8_t *destData, size_t destRowPitch, size_t destDepthPitch)
{ … }
template <typename T>
static void GenerateMip_XYZ(size_t sourceWidth, size_t sourceHeight, size_t sourceDepth,
const uint8_t *sourceData, size_t sourceRowPitch, size_t sourceDepthPitch,
size_t destWidth, size_t destHeight, size_t destDepth,
uint8_t *destData, size_t destRowPitch, size_t destDepthPitch)
{ … }
MipGenerationFunction;
template <typename T>
static MipGenerationFunction GetMipGenerationFunction(size_t sourceWidth, size_t sourceHeight, size_t sourceDepth)
{ … }
}
template <typename T>
inline void GenerateMip(size_t sourceWidth, size_t sourceHeight, size_t sourceDepth,
const uint8_t *sourceData, size_t sourceRowPitch, size_t sourceDepthPitch,
uint8_t *destData, size_t destRowPitch, size_t destDepthPitch)
{ … }
}