diff options
| author | 2012-02-22 16:00:49 -0800 | |
|---|---|---|
| committer | 2012-02-22 16:00:49 -0800 | |
| commit | 20b05f91926aba1097191318a37693ca606b0367 (patch) | |
| tree | 0efe8e381ec1cb061ac1656849435dbc73862c6a /libs/ui/FramebufferNativeWindow.cpp | |
| parent | 0f2a25a75f569e96ac3ae64ecfcc1d647b6b1fe0 (diff) | |
| parent | c6cd27cbf3ddec77cca97e5bd2b257f80ea99706 (diff) | |
Merge "libui: add ability to force a framebuffer format for EGL's use"
Diffstat (limited to 'libs/ui/FramebufferNativeWindow.cpp')
| -rw-r--r-- | libs/ui/FramebufferNativeWindow.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp index d1dca0c906..26d4823db1 100644 --- a/libs/ui/FramebufferNativeWindow.cpp +++ b/libs/ui/FramebufferNativeWindow.cpp @@ -100,6 +100,18 @@ FramebufferNativeWindow::FramebufferNativeWindow() mNumFreeBuffers = NUM_FRAME_BUFFERS; mBufferHead = mNumBuffers-1; + /* + * This does not actually change the framebuffer format. It merely + * fakes this format to surfaceflinger so that when it creates + * framebuffer surfaces it will use this format. It's really a giant + * HACK to allow interworking with buggy gralloc+GPU driver + * implementations. You should *NEVER* need to set this for shipping + * devices. + */ +#ifdef FRAMEBUFFER_FORCE_FORMAT + *((uint32_t *)&fbDev->format) = FRAMEBUFFER_FORCE_FORMAT; +#endif + for (i = 0; i < mNumBuffers; i++) { buffers[i] = new NativeBuffer( |