Skip to content

Instantly share code, notes, and snippets.

@nicklaslof
Created July 28, 2012 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicklaslof/3194307 to your computer and use it in GitHub Desktop.
Save nicklaslof/3194307 to your computer and use it in GitHub Desktop.
temporary patch to framebuffer.cpp to avoid skipping frames (for 480x854 Xperia HDPI devices)
diff --git a/libgralloc/framebuffer.cpp b/libgralloc/framebuffer.cpp
index 9d974b4..5413674 100644
--- a/libgralloc/framebuffer.cpp
+++ b/libgralloc/framebuffer.cpp
@@ -131,6 +131,15 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer)
m->info.activate = FB_ACTIVATE_VBL;
m->info.yoffset = offset / m->finfo.line_length;
+
+ if (m->info.yoffset == 855){
+ m->info.yoffset = 854;
+ }
+
+ if (m->info.yoffset == 1710){
+ m->info.yoffset = 1708;
+ }
+
if (ioctl(m->framebuffer->fd, FBIOPUT_VSCREENINFO, &m->info) == -1) {
ALOGE("FBIOPUT_VSCREENINFO failed");
genlock_unlock_buffer(hnd);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment