summaryrefslogtreecommitdiffstats
path: root/framesequence/jni/Color.h
blob: e49c64a3737641c130bd8e2402ce7221dd8f1a01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Copyright (C) 2013 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef RASTERMILL_COLOR_H
#define RASTERMILL_COLOR_H

#include <sys/types.h>

typedef uint32_t Color8888;

static const Color8888 COLOR_8888_ALPHA_MASK = 0xff000000; // TODO: handle endianness
static const Color8888 TRANSPARENT = 0x0;

// TODO: handle endianness
#define ARGB_TO_COLOR8888(a, r, g, b) \
    ((a) << 24 | (b) << 16 | (g) << 8 | (r))

#endif // RASTERMILL_COLOR_H