Imported transform enums from Android and updated g_gfxQueueBufferData.transform for this.

This commit is contained in:
yellows8 2018-02-12 11:56:29 -05:00
parent 1d7556f583
commit 4b2a32af59
2 changed files with 40 additions and 2 deletions

View File

@ -18,7 +18,7 @@ typedef struct {
s32 isAutoTimestamp;
bufferProducerRect crop;
s32 scalingMode;
u32 transform;
u32 transform;//See the NATIVE_WINDOW_TRANSFORM_* enums.
u32 stickyTransform;
u32 unk[2];
bufferProducerFence fence;
@ -104,6 +104,44 @@ enum {
//...
};
//From Android hardware.h.
/**
* Transformation definitions
*
* IMPORTANT NOTE:
* HAL_TRANSFORM_ROT_90 is applied CLOCKWISE and AFTER HAL_TRANSFORM_FLIP_{H|V}.
*
*/
enum {
/* flip source image horizontally (around the vertical axis) */
HAL_TRANSFORM_FLIP_H = 0x01,
/* flip source image vertically (around the horizontal axis)*/
HAL_TRANSFORM_FLIP_V = 0x02,
/* rotate source image 90 degrees clockwise */
HAL_TRANSFORM_ROT_90 = 0x04,
/* rotate source image 180 degrees */
HAL_TRANSFORM_ROT_180 = 0x03,
/* rotate source image 270 degrees clockwise */
HAL_TRANSFORM_ROT_270 = 0x07,
};
//From Android window.h.
/* parameter for NATIVE_WINDOW_SET_BUFFERS_TRANSFORM */
enum {
/* flip source image horizontally */
NATIVE_WINDOW_TRANSFORM_FLIP_H = HAL_TRANSFORM_FLIP_H,
/* flip source image vertically */
NATIVE_WINDOW_TRANSFORM_FLIP_V = HAL_TRANSFORM_FLIP_V,
/* rotate source image 90 degrees clock-wise */
NATIVE_WINDOW_TRANSFORM_ROT_90 = HAL_TRANSFORM_ROT_90,
/* rotate source image 180 degrees */
NATIVE_WINDOW_TRANSFORM_ROT_180 = HAL_TRANSFORM_ROT_180,
/* rotate source image 270 degrees clock-wise */
NATIVE_WINDOW_TRANSFORM_ROT_270 = HAL_TRANSFORM_ROT_270,
};
Result bufferProducerInitialize(Binder *session);
void bufferProducerExit(void);

View File

@ -57,7 +57,7 @@ static bufferProducerQueueBufferInput g_gfxQueueBufferData = {
.isAutoTimestamp = 0x1,
.crop = {0x0, 0x0, 0x0, 0x0}, //Official apps which use multiple resolutions configure this for the currently used resolution, depending on the current appletOperationMode.
.scalingMode = 0x0,
.transform = 0x2,
.transform = NATIVE_WINDOW_TRANSFORM_FLIP_V,
.stickyTransform = 0x0,
.unk = {0x0, 0x1},