diff options
| author | 2010-06-30 16:01:33 -0700 | |
|---|---|---|
| committer | 2010-06-30 16:01:33 -0700 | |
| commit | e341a0b5e9a1e30a020970a69c58c34f902ea06f (patch) | |
| tree | ab13f2fe19b73142b7e93c40d08f9ddf082f1b8d | |
| parent | c511d4f84cd2f71df610286e9373ca0fe38b1353 (diff) | |
| parent | 30fe6fa07a9b9c6e7498198608125add8eb40744 (diff) | |
am 30fe6fa0: Merge "fix live wallpapers on Droid" into gingerbread
Merge commit '30fe6fa07a9b9c6e7498198608125add8eb40744' into gingerbread-plus-aosp
* commit '30fe6fa07a9b9c6e7498198608125add8eb40744':
fix live wallpapers on Droid
| -rw-r--r-- | libs/surfaceflinger/Android.mk | 4 | ||||
| -rw-r--r-- | libs/surfaceflinger/SurfaceFlinger.cpp | 9 | ||||
| -rw-r--r-- | libs/ui/GraphicBuffer.cpp | 12 |
3 files changed, 13 insertions, 12 deletions
diff --git a/libs/surfaceflinger/Android.mk b/libs/surfaceflinger/Android.mk index dbe351e5ab3d..a14bfb569b8b 100644 --- a/libs/surfaceflinger/Android.mk +++ b/libs/surfaceflinger/Android.mk @@ -20,6 +20,10 @@ LOCAL_SRC_FILES:= \ LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" 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 ifeq ($(TARGET_SIMULATOR),true) ifeq ($(HOST_OS),linux) diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp index 23efd161fad7..68e8f19e7ec0 100644 --- a/libs/surfaceflinger/SurfaceFlinger.cpp +++ b/libs/surfaceflinger/SurfaceFlinger.cpp @@ -1263,10 +1263,19 @@ sp<Layer> SurfaceFlinger::createNormalSurface( format = PIXEL_FORMAT_RGBA_8888; break; case PIXEL_FORMAT_OPAQUE: +#ifdef NO_RGBX_8888 + format = PIXEL_FORMAT_RGB_565; +#else format = PIXEL_FORMAT_RGBX_8888; +#endif 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); status_t err = layer->setBuffers(w, h, format, flags); if (LIKELY(err != NO_ERROR)) { diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp index 4b5f02517a04..519c277c603a 100644 --- a/libs/ui/GraphicBuffer.cpp +++ b/libs/ui/GraphicBuffer.cpp @@ -127,18 +127,6 @@ status_t GraphicBuffer::initSize(uint32_t w, uint32_t h, PixelFormat format, { GraphicBufferAllocator& allocator = GraphicBufferAllocator::get(); 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) { this->width = w; this->height = h; |