Debian Codegraph @

thirdparty/swappy-frame-pacing/common/gamesdk_common.h

raw symbols SCIP
1 /*
2 * Copyright 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 /*
18 * This is the main interface to the Android Performance Tuner library, also
19 * known as Tuning Fork.
20 *
21 * It is part of the Android Games SDK and produces best results when integrated
22 * with the Swappy Frame Pacing Library.
23 *
24 * See the documentation at
25 * https://developer.android.com/games/sdk/performance-tuner/custom-engine for
26 * more information on using this library in a native Android game.
27 *
28 */
29
30 #pragma once
31
32 // There are separate versions for each GameSDK component that use this format:
33 #define ANDROID_GAMESDK_PACKED_VERSION(MAJOR, MINOR, BUGFIX) \
34 ((MAJOR << 16) | (MINOR << 8) | (BUGFIX))
35 // Accessors
36 #define ANDROID_GAMESDK_MAJOR_VERSION(PACKED) ((PACKED) >> 16)
37 #define ANDROID_GAMESDK_MINOR_VERSION(PACKED) (((PACKED) >> 8) & 0xff)
38 #define ANDROID_GAMESDK_BUGFIX_VERSION(PACKED) ((PACKED) & 0xff)
39
40 #define AGDK_STRINGIFY(NUMBER) #NUMBER
41 #define AGDK_STRING_VERSION(MAJOR, MINOR, BUGFIX) \
42 AGDK_STRINGIFY(MAJOR) "." AGDK_STRINGIFY(MINOR) "." AGDK_STRINGIFY(BUGFIX)