summaryrefslogtreecommitdiff
path: root/libs/ui/FramebufferNativeWindow.cpp
diff options
context:
space:
mode:
author Dima Zavin <dima@android.com> 2012-02-22 16:00:49 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2012-02-22 16:00:49 -0800
commit77d9ee4df6098e78ce034fa80f046f3b42de8cb3 (patch)
tree21dba4f758f9c126c378a1141e79feb994022803 /libs/ui/FramebufferNativeWindow.cpp
parent29cc47e62e1372f020c0488592c0bb1747f9a1f2 (diff)
parent180600dec8b1b2900da42f2158edc70cf2264fbc (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.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp
index d1dca0c906db..26d4823db110 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(