Make SurfaceFlinger respect swapinterval property

A Google modification to eglCreateWindowSurface was
causing SurfaceFlinger to set its swap interval
value back to 1, regardless of the value set in the
debug.gr.swapinterval property.

This patch modifies the fb_setSwapInterval function
in gralloc to check the debug.gr.swapinterval
property and not change the swap interval if a value
is set there.

CRs-fixed: 329524
Change-Id: I80463c1209addbff227db7832dd0023e94eb06ac
This commit is contained in:
Kevin Matlage 2012-01-11 10:42:50 -07:00 committed by Andrew Sutherland
parent 235f541ec5
commit d6b1474f2d

View File

@ -159,6 +159,12 @@ msm_copy_buffer(buffer_handle_t handle, int fd,
static int fb_setSwapInterval(struct framebuffer_device_t* dev,
int interval)
{
char pval[PROPERTY_VALUE_MAX];
property_get("debug.gr.swapinterval", pval, "-1");
int property_interval = atoi(pval);
if (property_interval >= 0)
interval = property_interval;
fb_context_t* ctx = (fb_context_t*)dev;
private_module_t* m = reinterpret_cast<private_module_t*>(
dev->common.module);