[video] change GrLfbInfo_t to gfxLfbInfo_t

This commit is contained in:
zilmar 2017-08-08 22:21:56 +10:00
parent 1108535bd9
commit 35afe5ef45
6 changed files with 15 additions and 7 deletions

View File

@ -1271,8 +1271,8 @@ void newSwapBuffers()
const uint32_t image_width = g_scr_res_x - offset_x * 2;
const uint32_t image_height = g_scr_res_y - offset_y * 2;
GrLfbInfo_t info;
info.size = sizeof(GrLfbInfo_t);
gfxLfbInfo_t info;
info.size = sizeof(gfxLfbInfo_t);
if (gfxLfbLock(GFX_LFB_READ_ONLY, GFX_BUFFER_BACKBUFFER, GFX_LFBWRITEMODE_565, GFX_ORIGIN_UPPER_LEFT, FXFALSE, &info))
{
AUTO_PTR<uint8_t> ssimg_buffer(new uint8_t[image_width * image_height * 3]);

View File

@ -1324,7 +1324,7 @@ void gfxBufferSwap(uint32_t swap_interval)
}
// frame buffer
bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, gfxLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, GrLfbInfo_t *info)
bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, gfxLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, gfxLfbInfo_t *info)
{
WriteTrace(TraceGlitch, TraceDebug, "type: %d buffer: %d writeMode: %d origin: %d pixelPipeline: %d", type, buffer, writeMode, origin, pixelPipeline);
if (type == GFX_LFB_WRITE_ONLY)

View File

@ -1604,7 +1604,7 @@ void gfxBufferSwap(uint32_t swap_interval)
}
// frame buffer
bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, gfxLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, GrLfbInfo_t *info)
bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, gfxLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, gfxLfbInfo_t *info)
{
WriteTrace(TraceGlitch, TraceDebug, "type: %d buffer: %d writeMode: %d origin: %d pixelPipeline: %d", type, buffer, writeMode, origin, pixelPipeline);
if (type == GFX_LFB_WRITE_ONLY)

View File

@ -57,7 +57,7 @@ uint32_t gfxGet(uint32_t pname, uint32_t plength, FxI32 *params);
void gfxRenderBuffer(gfxBuffer_t buffer);
void gfxBufferClear(gfxColor_t color, gfxAlpha_t alpha, uint32_t depth);
void gfxBufferSwap(uint32_t swap_interval);
bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, gfxLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, GrLfbInfo_t *info);
bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, gfxLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, gfxLfbInfo_t *info);
bool gfxLfbUnlock(gfxLock_t type, gfxBuffer_t buffer);
bool gfxLfbReadRegion(gfxBuffer_t src_buffer, uint32_t src_x, uint32_t src_y, uint32_t src_width, uint32_t src_height, uint32_t dst_stride, void *dst_data);
bool gfxLfbWriteRegion(gfxBuffer_t dst_buffer, uint32_t dst_x, uint32_t dst_y, GrLfbSrcFmt_t src_format, uint32_t src_width, uint32_t src_height, bool pixelPipeline, FxI32 src_stride, void *src_data);

View File

@ -327,3 +327,11 @@ typedef struct
gfxTextureFormat_t format;
void *data;
} gfxTexInfo;
typedef struct {
int32_t size;
void *lfbPtr;
uint32_t strideInBytes;
gfxLfbWriteMode_t writeMode;
gfxOriginLocation_t origin;
} gfxLfbInfo_t;

View File

@ -660,8 +660,8 @@ static void CopyFrameBuffer(gfxBuffer_t buffer = GFX_BUFFER_BACKBUFFER)
float scale_y = (g_scr_res_y - rdp.offset_y*2.0f) / maxval(height, rdp.vi_height);
WriteTrace(TraceRDP, TraceDebug, "width: %d, height: %d, ul_y: %d, lr_y: %d, scale_x: %f, scale_y: %f, ci_width: %d, ci_height: %d", width, height, rdp.ci_upper_bound, rdp.ci_lower_bound, scale_x, scale_y, rdp.ci_width, rdp.ci_height);
GrLfbInfo_t info;
info.size = sizeof(GrLfbInfo_t);
gfxLfbInfo_t info;
info.size = sizeof(gfxLfbInfo_t);
if (gfxLfbLock(GFX_LFB_READ_ONLY,
buffer,