Loading libs/surfaceflinger/Android.mk +4 −0 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,10 @@ LOCAL_SRC_FILES:= \ LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES ifeq ($(TARGET_BOARD_PLATFORM), omap3) LOCAL_CFLAGS += -DNO_RGBX_8888 endif # need "-lrt" on Linux simulator to pick up clock_gettime # need "-lrt" on Linux simulator to pick up clock_gettime ifeq ($(TARGET_SIMULATOR),true) ifeq ($(TARGET_SIMULATOR),true) ifeq ($(HOST_OS),linux) ifeq ($(HOST_OS),linux) Loading libs/surfaceflinger/SurfaceFlinger.cpp +9 −0 Original line number Original line Diff line number Diff line Loading @@ -1263,10 +1263,19 @@ sp<Layer> SurfaceFlinger::createNormalSurface( format = PIXEL_FORMAT_RGBA_8888; format = PIXEL_FORMAT_RGBA_8888; break; break; case PIXEL_FORMAT_OPAQUE: case PIXEL_FORMAT_OPAQUE: #ifdef NO_RGBX_8888 format = PIXEL_FORMAT_RGB_565; #else format = PIXEL_FORMAT_RGBX_8888; format = PIXEL_FORMAT_RGBX_8888; #endif break; break; } } #ifdef NO_RGBX_8888 if (format == PIXEL_FORMAT_RGBX_8888) format = PIXEL_FORMAT_RGBA_8888; #endif sp<Layer> layer = new Layer(this, display, client); sp<Layer> layer = new Layer(this, display, client); status_t err = layer->setBuffers(w, h, format, flags); status_t err = layer->setBuffers(w, h, format, flags); if (LIKELY(err != NO_ERROR)) { if (LIKELY(err != NO_ERROR)) { Loading libs/ui/GraphicBuffer.cpp +0 −12 Original line number Original line Diff line number Diff line Loading @@ -127,18 +127,6 @@ status_t GraphicBuffer::initSize(uint32_t w, uint32_t h, PixelFormat format, { { GraphicBufferAllocator& allocator = GraphicBufferAllocator::get(); GraphicBufferAllocator& allocator = GraphicBufferAllocator::get(); status_t err = allocator.alloc(w, h, format, reqUsage, &handle, &stride); status_t err = allocator.alloc(w, h, format, reqUsage, &handle, &stride); if (err<0 && format == PIXEL_FORMAT_RGBX_8888) { /* * There is currently a bug with some gralloc implementations * not supporting RGBX_8888. In this case, we revert to using RGBA_8888 * which is not exactly the same, as GL_REPLACE will yield a different * result. */ format = PIXEL_FORMAT_RGBA_8888; err = allocator.alloc(w, h, format, reqUsage, &handle, &stride); } if (err == NO_ERROR) { if (err == NO_ERROR) { this->width = w; this->width = w; this->height = h; this->height = h; Loading Loading
libs/surfaceflinger/Android.mk +4 −0 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,10 @@ LOCAL_SRC_FILES:= \ LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES ifeq ($(TARGET_BOARD_PLATFORM), omap3) LOCAL_CFLAGS += -DNO_RGBX_8888 endif # need "-lrt" on Linux simulator to pick up clock_gettime # need "-lrt" on Linux simulator to pick up clock_gettime ifeq ($(TARGET_SIMULATOR),true) ifeq ($(TARGET_SIMULATOR),true) ifeq ($(HOST_OS),linux) ifeq ($(HOST_OS),linux) Loading
libs/surfaceflinger/SurfaceFlinger.cpp +9 −0 Original line number Original line Diff line number Diff line Loading @@ -1263,10 +1263,19 @@ sp<Layer> SurfaceFlinger::createNormalSurface( format = PIXEL_FORMAT_RGBA_8888; format = PIXEL_FORMAT_RGBA_8888; break; break; case PIXEL_FORMAT_OPAQUE: case PIXEL_FORMAT_OPAQUE: #ifdef NO_RGBX_8888 format = PIXEL_FORMAT_RGB_565; #else format = PIXEL_FORMAT_RGBX_8888; format = PIXEL_FORMAT_RGBX_8888; #endif break; break; } } #ifdef NO_RGBX_8888 if (format == PIXEL_FORMAT_RGBX_8888) format = PIXEL_FORMAT_RGBA_8888; #endif sp<Layer> layer = new Layer(this, display, client); sp<Layer> layer = new Layer(this, display, client); status_t err = layer->setBuffers(w, h, format, flags); status_t err = layer->setBuffers(w, h, format, flags); if (LIKELY(err != NO_ERROR)) { if (LIKELY(err != NO_ERROR)) { Loading
libs/ui/GraphicBuffer.cpp +0 −12 Original line number Original line Diff line number Diff line Loading @@ -127,18 +127,6 @@ status_t GraphicBuffer::initSize(uint32_t w, uint32_t h, PixelFormat format, { { GraphicBufferAllocator& allocator = GraphicBufferAllocator::get(); GraphicBufferAllocator& allocator = GraphicBufferAllocator::get(); status_t err = allocator.alloc(w, h, format, reqUsage, &handle, &stride); status_t err = allocator.alloc(w, h, format, reqUsage, &handle, &stride); if (err<0 && format == PIXEL_FORMAT_RGBX_8888) { /* * There is currently a bug with some gralloc implementations * not supporting RGBX_8888. In this case, we revert to using RGBA_8888 * which is not exactly the same, as GL_REPLACE will yield a different * result. */ format = PIXEL_FORMAT_RGBA_8888; err = allocator.alloc(w, h, format, reqUsage, &handle, &stride); } if (err == NO_ERROR) { if (err == NO_ERROR) { this->width = w; this->width = w; this->height = h; this->height = h; Loading