xref: /aosp_15_r20/external/angle/src/image_util/copyimage.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker //
2*8975f5c5SAndroid Build Coastguard Worker // Copyright 2013 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 // copyimage.h: Defines image copying functions
8*8975f5c5SAndroid Build Coastguard Worker 
9*8975f5c5SAndroid Build Coastguard Worker #ifndef IMAGEUTIL_COPYIMAGE_H_
10*8975f5c5SAndroid Build Coastguard Worker #define IMAGEUTIL_COPYIMAGE_H_
11*8975f5c5SAndroid Build Coastguard Worker 
12*8975f5c5SAndroid Build Coastguard Worker #include "common/Color.h"
13*8975f5c5SAndroid Build Coastguard Worker 
14*8975f5c5SAndroid Build Coastguard Worker #include "image_util/imageformats.h"
15*8975f5c5SAndroid Build Coastguard Worker 
16*8975f5c5SAndroid Build Coastguard Worker #include <stdint.h>
17*8975f5c5SAndroid Build Coastguard Worker 
18*8975f5c5SAndroid Build Coastguard Worker namespace angle
19*8975f5c5SAndroid Build Coastguard Worker {
20*8975f5c5SAndroid Build Coastguard Worker 
21*8975f5c5SAndroid Build Coastguard Worker template <typename sourceType, typename colorDataType>
22*8975f5c5SAndroid Build Coastguard Worker void ReadColor(const uint8_t *source, uint8_t *dest);
23*8975f5c5SAndroid Build Coastguard Worker 
24*8975f5c5SAndroid Build Coastguard Worker template <typename destType, typename colorDataType>
25*8975f5c5SAndroid Build Coastguard Worker void WriteColor(const uint8_t *source, uint8_t *dest);
26*8975f5c5SAndroid Build Coastguard Worker 
27*8975f5c5SAndroid Build Coastguard Worker template <typename SourceType>
28*8975f5c5SAndroid Build Coastguard Worker void ReadDepthStencil(const uint8_t *source, uint8_t *dest);
29*8975f5c5SAndroid Build Coastguard Worker 
30*8975f5c5SAndroid Build Coastguard Worker template <typename DestType>
31*8975f5c5SAndroid Build Coastguard Worker void WriteDepthStencil(const uint8_t *source, uint8_t *dest);
32*8975f5c5SAndroid Build Coastguard Worker 
33*8975f5c5SAndroid Build Coastguard Worker void CopyBGRA8ToRGBA8(const uint8_t *source,
34*8975f5c5SAndroid Build Coastguard Worker                       int srcXAxisPitch,
35*8975f5c5SAndroid Build Coastguard Worker                       int srcYAxisPitch,
36*8975f5c5SAndroid Build Coastguard Worker                       uint8_t *dest,
37*8975f5c5SAndroid Build Coastguard Worker                       int destXAxisPitch,
38*8975f5c5SAndroid Build Coastguard Worker                       int destYAxisPitch,
39*8975f5c5SAndroid Build Coastguard Worker                       int destWidth,
40*8975f5c5SAndroid Build Coastguard Worker                       int destHeight);
41*8975f5c5SAndroid Build Coastguard Worker 
42*8975f5c5SAndroid Build Coastguard Worker }  // namespace angle
43*8975f5c5SAndroid Build Coastguard Worker 
44*8975f5c5SAndroid Build Coastguard Worker #include "copyimage.inc"
45*8975f5c5SAndroid Build Coastguard Worker 
46*8975f5c5SAndroid Build Coastguard Worker #endif  // IMAGEUTIL_COPYIMAGE_H_
47