android_stub: Update platform headers to include gralloc1.h.

This header is used in anv and radv, and soon turnip.  Since the script
just checks out master, this also bumps the headers to upstream
02dfcc7c1562 ("Merge "Merge Android R"")

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6821>
This commit is contained in:
Eric Anholt
2020-09-22 10:55:53 -07:00
committed by Marge Bot
parent 72799886e7
commit e92f4ac9f4
10 changed files with 1548 additions and 55 deletions

View File

@@ -101,6 +101,56 @@ enum ADataSpace {
* Use full range, SMPTE 2084 (PQ) transfer and BT2020 standard
*/
ADATASPACE_BT2020_PQ = 163971072, // STANDARD_BT2020 | TRANSFER_ST2084 | RANGE_FULL
/**
* Adobe RGB
*
* Use full range, gamma 2.2 transfer and Adobe RGB primaries
* Note: Application is responsible for gamma encoding the data as
* a 2.2 gamma encoding is not supported in HW.
*/
ADATASPACE_ADOBE_RGB = 151715840, // STANDARD_ADOBE_RGB | TRANSFER_GAMMA2_2 | RANGE_FULL
/**
* ITU-R Recommendation 2020 (BT.2020)
*
* Ultra High-definition television
*
* Use full range, BT.709 transfer and BT2020 standard
*/
ADATASPACE_BT2020 = 147193856, // STANDARD_BT2020 | TRANSFER_SMPTE_170M | RANGE_FULL
/**
* ITU-R Recommendation 709 (BT.709)
*
* High-definition television
*
* Use limited range, BT.709 transfer and BT.709 standard.
*/
ADATASPACE_BT709 = 281083904, // STANDARD_BT709 | TRANSFER_SMPTE_170M | RANGE_LIMITED
/**
* SMPTE EG 432-1 and SMPTE RP 431-2.
*
* Digital Cinema DCI-P3
*
* Use full range, gamma 2.6 transfer and D65 DCI-P3 standard
* Note: Application is responsible for gamma encoding the data as
* a 2.6 gamma encoding is not supported in HW.
*/
ADATASPACE_DCI_P3 = 155844608, // STANDARD_DCI_P3 | TRANSFER_GAMMA2_6 | RANGE_FULL
/**
* sRGB linear encoding:
*
* The red, green, and blue components are stored in sRGB space, but
* are linear, not gamma-encoded.
* The RGB primaries and the white point are the same as BT.709.
*
* The values are encoded using the full range ([0,255] for 8-bit) for all
* components.
*/
ADATASPACE_SRGB_LINEAR = 138477568, // STANDARD_BT709 | TRANSFER_LINEAR | RANGE_FULL
};
__END_DECLS

View File

@@ -33,6 +33,7 @@
#ifndef ANDROID_NATIVE_WINDOW_H
#define ANDROID_NATIVE_WINDOW_H
#include <stdint.h>
#include <sys/cdefs.h>
#include <android/data_space.h>
@@ -230,6 +231,78 @@ int32_t ANativeWindow_getBuffersDataSpace(ANativeWindow* window) __INTRODUCED_IN
#endif // __ANDROID_API__ >= 28
#if __ANDROID_API__ >= 30
/** Compatibility value for ANativeWindow_setFrameRate. */
enum ANativeWindow_FrameRateCompatibility {
/**
* There are no inherent restrictions on the frame rate of this window. When
* the system selects a frame rate other than what the app requested, the
* app will be able to run at the system frame rate without requiring pull
* down. This value should be used when displaying game content, UIs, and
* anything that isn't video.
*/
ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_DEFAULT = 0,
/**
* This window is being used to display content with an inherently fixed
* frame rate, e.g.\ a video that has a specific frame rate. When the system
* selects a frame rate other than what the app requested, the app will need
* to do pull down or use some other technique to adapt to the system's
* frame rate. The user experience is likely to be worse (e.g. more frame
* stuttering) than it would be if the system had chosen the app's requested
* frame rate. This value should be used for video content.
*/
ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_FIXED_SOURCE = 1
};
/**
* Sets the intended frame rate for this window.
*
* On devices that are capable of running the display at different refresh
* rates, the system may choose a display refresh rate to better match this
* window's frame rate. Usage of this API won't introduce frame rate throttling,
* or affect other aspects of the application's frame production
* pipeline. However, because the system may change the display refresh rate,
* calls to this function may result in changes to Choreographer callback
* timings, and changes to the time interval at which the system releases
* buffers back to the application.
*
* Note that this only has an effect for windows presented on the display. If
* this ANativeWindow is consumed by something other than the system compositor,
* e.g. a media codec, this call has no effect.
*
* Available since API level 30.
*
* \param frameRate The intended frame rate of this window, in frames per
* second. 0 is a special value that indicates the app will accept the system's
* choice for the display frame rate, which is the default behavior if this
* function isn't called. The frameRate param does <em>not</em> need to be a
* valid refresh rate for this device's display - e.g., it's fine to pass 30fps
* to a device that can only run the display at 60fps.
*
* \param compatibility The frame rate compatibility of this window. The
* compatibility value may influence the system's choice of display refresh
* rate. See the ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_* values for more info.
*
* \return 0 for success, -EINVAL if the window, frame rate, or compatibility
* value are invalid.
*/
int32_t ANativeWindow_setFrameRate(ANativeWindow* window, float frameRate, int8_t compatibility)
__INTRODUCED_IN(30);
/**
* Provides a hint to the window that buffers should be preallocated ahead of
* time. Note that the window implementation is not guaranteed to preallocate
* any buffers, for instance if an implementation disallows allocation of new
* buffers, or if there is insufficient memory in the system to preallocate
* additional buffers
*
* Available since API level 30.
*/
void ANativeWindow_tryAllocateBuffers(ANativeWindow* window);
#endif // __ANDROID_API__ >= 30
#ifdef __cplusplus
};
#endif