xref: /aosp_15_r20/external/angle/src/image_util/generatemip.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker //
2*8975f5c5SAndroid Build Coastguard Worker // Copyright 2002 The ANGLE Project Authors. All rights reserved.
3*8975f5c5SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
4*8975f5c5SAndroid Build Coastguard Worker // found in the LICENSE file.
5*8975f5c5SAndroid Build Coastguard Worker //
6*8975f5c5SAndroid Build Coastguard Worker 
7*8975f5c5SAndroid Build Coastguard Worker // generatemip.h: Defines the GenerateMip function, templated on the format
8*8975f5c5SAndroid Build Coastguard Worker // type of the image for which mip levels are being generated.
9*8975f5c5SAndroid Build Coastguard Worker 
10*8975f5c5SAndroid Build Coastguard Worker #ifndef IMAGEUTIL_GENERATEMIP_H_
11*8975f5c5SAndroid Build Coastguard Worker #define IMAGEUTIL_GENERATEMIP_H_
12*8975f5c5SAndroid Build Coastguard Worker 
13*8975f5c5SAndroid Build Coastguard Worker #include <stddef.h>
14*8975f5c5SAndroid Build Coastguard Worker #include <stdint.h>
15*8975f5c5SAndroid Build Coastguard Worker 
16*8975f5c5SAndroid Build Coastguard Worker namespace angle
17*8975f5c5SAndroid Build Coastguard Worker {
18*8975f5c5SAndroid Build Coastguard Worker 
19*8975f5c5SAndroid Build Coastguard Worker template <typename T>
20*8975f5c5SAndroid Build Coastguard Worker inline void GenerateMip(size_t sourceWidth,
21*8975f5c5SAndroid Build Coastguard Worker                         size_t sourceHeight,
22*8975f5c5SAndroid Build Coastguard Worker                         size_t sourceDepth,
23*8975f5c5SAndroid Build Coastguard Worker                         const uint8_t *sourceData,
24*8975f5c5SAndroid Build Coastguard Worker                         size_t sourceRowPitch,
25*8975f5c5SAndroid Build Coastguard Worker                         size_t sourceDepthPitch,
26*8975f5c5SAndroid Build Coastguard Worker                         uint8_t *destData,
27*8975f5c5SAndroid Build Coastguard Worker                         size_t destRowPitch,
28*8975f5c5SAndroid Build Coastguard Worker                         size_t destDepthPitch);
29*8975f5c5SAndroid Build Coastguard Worker 
30*8975f5c5SAndroid Build Coastguard Worker }  // namespace angle
31*8975f5c5SAndroid Build Coastguard Worker 
32*8975f5c5SAndroid Build Coastguard Worker #include "generatemip.inc"
33*8975f5c5SAndroid Build Coastguard Worker 
34*8975f5c5SAndroid Build Coastguard Worker #endif  // IMAGEUTIL_GENERATEMIP_H_
35