Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20b05f91 authored by Dima Zavin's avatar Dima Zavin Committed by Android (Google) Code Review
Browse files

Merge "libui: add ability to force a framebuffer format for EGL's use"

parents 0f2a25a7 c6cd27cb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -31,6 +31,10 @@ LOCAL_SHARED_LIBRARIES := \
	libEGL \
	libhardware

ifneq ($(BOARD_FRAMEBUFFER_FORCE_FORMAT),)
LOCAL_CFLAGS += -DFRAMEBUFFER_FORCE_FORMAT=$(BOARD_FRAMEBUFFER_FORCE_FORMAT)
endif

LOCAL_MODULE:= libui

include $(BUILD_SHARED_LIBRARY)
+12 −0
Original line number Diff line number Diff line
@@ -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(