diff options
author | Mathias Agopian <mathias@google.com> | 2009-07-06 20:49:05 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-07-06 20:56:13 -0700 |
commit | cdb66fbc8a192e4b01b8b529c78773b2a3bf4573 (patch) | |
tree | 21d474c410fc2afbe4ea4d302fee8b8ced3b0a5f /modules/gralloc/framebuffer.cpp | |
parent | 3d6ddfe77133198f48f0670d93172ee67d5b5ea7 (diff) |
workaroud [1964234] emulator renders funny with new gralloc.
we detect we're running on the emu (using a very bad heuristic, see 1964251) and switch UPDATE_ON_DEMAND off.
Diffstat (limited to 'modules/gralloc/framebuffer.cpp')
-rw-r--r-- | modules/gralloc/framebuffer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/gralloc/framebuffer.cpp b/modules/gralloc/framebuffer.cpp index 248a2fc5..2d0fa255 100644 --- a/modules/gralloc/framebuffer.cpp +++ b/modules/gralloc/framebuffer.cpp @@ -41,6 +41,10 @@ // should be a build option #define SUPPORTS_UPDATE_ON_DEMAND 1 +// fb_fix_screeninfo::id returned on the emulator +#define EMULATOR_DEV_FB_ID "" + +// numbers of buffers for page flipping #define NUM_BUFFERS 2 @@ -366,6 +370,12 @@ int fb_device_open(hw_module_t const* module, const char* name, const_cast<int&>(dev->device.minSwapInterval) = 1; const_cast<int&>(dev->device.maxSwapInterval) = 1; + if (!strcmp(m->finfo.id, EMULATOR_DEV_FB_ID)) { + LOGD("I think we're running on the emulator, " + "turning UPDATE_ON_DEMAND off"); + dev->device.setUpdateRect = 0; + } + *device = &dev->device.common; } } |