chromium/third_party/angle/src/image_util/generatemip.inc

//
// Copyright 2015 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.
//

// generatemip.inc: Defines the GenerateMip function, templated on the format
// type of the image for which mip levels are being generated.

#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)
{}

}  // namespace priv

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)
{}

}  // namespace angle