sim: read the second buffer
It can only read the contents of the first buffer, so fblen should be changed to ensure that it can read the second buffer as well. Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
This commit is contained in:
parent
4d42fdf195
commit
f5fe7646ed
@ -83,11 +83,11 @@ static unsigned short g_fbpixelwidth;
|
||||
static unsigned short g_fbpixelheight;
|
||||
static int g_fbbpp;
|
||||
static int g_fblen;
|
||||
static int g_fbcount;
|
||||
static int g_shmcheckpoint = 0;
|
||||
static int b_useshm;
|
||||
|
||||
static unsigned char *g_trans_framebuffer;
|
||||
static unsigned int g_offset;
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
@ -465,7 +465,6 @@ int sim_x11initialize(unsigned short width, unsigned short height,
|
||||
|
||||
g_fbbpp = depth;
|
||||
g_fblen = *fblen;
|
||||
g_fbcount = fbcount;
|
||||
|
||||
/* Create conversion framebuffer */
|
||||
|
||||
@ -541,6 +540,7 @@ int sim_x11setoffset(unsigned int offset)
|
||||
if (g_fbbpp == 32 && CONFIG_SIM_FBBPP == 16)
|
||||
{
|
||||
g_image->data = g_framebuffer + (offset << 1);
|
||||
g_offset = offset;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -620,9 +620,9 @@ int sim_x11update(void)
|
||||
|
||||
if (g_fbbpp == 32 && CONFIG_SIM_FBBPP == 16)
|
||||
{
|
||||
sim_x11depth16to32(g_framebuffer,
|
||||
g_fblen * g_fbcount,
|
||||
g_trans_framebuffer);
|
||||
sim_x11depth16to32(g_image->data,
|
||||
g_fblen,
|
||||
g_trans_framebuffer + g_offset);
|
||||
}
|
||||
|
||||
XSync(g_display, 0);
|
||||
|
@ -470,6 +470,7 @@ int up_fbinitialize(int display)
|
||||
&g_planeinfo.fbmem, &g_planeinfo.fblen,
|
||||
&g_planeinfo.bpp, &g_planeinfo.stride,
|
||||
CONFIG_SIM_FRAMEBUFFER_COUNT);
|
||||
g_planeinfo.fblen *= CONFIG_SIM_FRAMEBUFFER_COUNT;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
|
@ -451,6 +451,7 @@ static const char *g_white_content_list[] =
|
||||
"AsyncBoth",
|
||||
"CurrentTime",
|
||||
"XUnmapWindow",
|
||||
"XFree",
|
||||
|
||||
/* Ref:
|
||||
* nuttx/arch/sim/src/sim_hostdecoder.*
|
||||
|
Loading…
Reference in New Issue
Block a user