Loading include/ui/PixelFormat.h +6 −7 Original line number Diff line number Diff line Loading @@ -64,9 +64,6 @@ enum { PIXEL_FORMAT_RGBA_5551 = HAL_PIXEL_FORMAT_RGBA_5551, // 16-bit ARGB PIXEL_FORMAT_RGBA_4444 = HAL_PIXEL_FORMAT_RGBA_4444, // 16-bit ARGB PIXEL_FORMAT_A_8 = 8, // 8-bit A // New formats can be added if they're also defined in // pixelflinger/format.h }; typedef int32_t PixelFormat; Loading @@ -83,6 +80,8 @@ struct PixelFormatInfo { ALPHA = 1, RGB = 2, RGBA = 3, L = 4, LA = 5, OTHER = 0xFF }; Loading libs/ui/PixelFormat.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,10 @@ static Info const sPixelFormatInfos[] = { { 4, 32, {32,24, 24,16, 16, 8, 8, 0 }, PixelFormatInfo::RGBA }, { 2, 16, { 1, 0, 16,11, 11, 6, 6, 1 }, PixelFormatInfo::RGBA }, { 2, 16, { 4, 0, 16,12, 12, 8, 8, 4 }, PixelFormatInfo::RGBA }, { 1, 8, { 8, 0, 0, 0, 0, 0, 0, 0 }, PixelFormatInfo::ALPHA} { 1, 8, { 8, 0, 0, 0, 0, 0, 0, 0 }, PixelFormatInfo::ALPHA}, { 1, 8, { 0, 0, 8, 0, 8, 0, 8, 0 }, PixelFormatInfo::L }, { 2, 16, {16, 8, 8, 0, 8, 0, 8, 0 }, PixelFormatInfo::LA }, { 1, 8, { 0, 0, 8, 5, 5, 2, 2, 0 }, PixelFormatInfo::RGB }, }; static const Info* gGetPixelFormatTable(size_t* numEntries) { Loading services/surfaceflinger/Layer.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -160,7 +160,10 @@ status_t Layer::setBuffers( uint32_t w, uint32_t h, // this surfaces pixel format PixelFormatInfo info; status_t err = getPixelFormatInfo(format, &info); if (err) return err; if (err) { ALOGE("unsupported pixelformat %d", format); return err; } // the display's pixel format const DisplayHardware& hw(graphicPlane(0).displayHardware()); Loading @@ -170,6 +173,7 @@ status_t Layer::setBuffers( uint32_t w, uint32_t h, // never allow a surface larger than what our underlying GL implementation // can handle. if ((uint32_t(w)>maxSurfaceDims) || (uint32_t(h)>maxSurfaceDims)) { ALOGE("dimensions too large %u x %u", uint32_t(w), uint32_t(h)); return BAD_VALUE; } Loading services/surfaceflinger/SurfaceFlinger.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1285,7 +1285,7 @@ sp<ISurface> SurfaceFlinger::createSurface( return surfaceHandle; } //ALOGD("createSurface for pid %d (%d x %d)", pid, w, h); //ALOGD("createSurface for (%d x %d), name=%s", w, h, name.string()); sp<Layer> normalLayer; switch (flags & eFXSurfaceMask) { case eFXSurfaceNormal: Loading Loading
include/ui/PixelFormat.h +6 −7 Original line number Diff line number Diff line Loading @@ -64,9 +64,6 @@ enum { PIXEL_FORMAT_RGBA_5551 = HAL_PIXEL_FORMAT_RGBA_5551, // 16-bit ARGB PIXEL_FORMAT_RGBA_4444 = HAL_PIXEL_FORMAT_RGBA_4444, // 16-bit ARGB PIXEL_FORMAT_A_8 = 8, // 8-bit A // New formats can be added if they're also defined in // pixelflinger/format.h }; typedef int32_t PixelFormat; Loading @@ -83,6 +80,8 @@ struct PixelFormatInfo { ALPHA = 1, RGB = 2, RGBA = 3, L = 4, LA = 5, OTHER = 0xFF }; Loading
libs/ui/PixelFormat.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,10 @@ static Info const sPixelFormatInfos[] = { { 4, 32, {32,24, 24,16, 16, 8, 8, 0 }, PixelFormatInfo::RGBA }, { 2, 16, { 1, 0, 16,11, 11, 6, 6, 1 }, PixelFormatInfo::RGBA }, { 2, 16, { 4, 0, 16,12, 12, 8, 8, 4 }, PixelFormatInfo::RGBA }, { 1, 8, { 8, 0, 0, 0, 0, 0, 0, 0 }, PixelFormatInfo::ALPHA} { 1, 8, { 8, 0, 0, 0, 0, 0, 0, 0 }, PixelFormatInfo::ALPHA}, { 1, 8, { 0, 0, 8, 0, 8, 0, 8, 0 }, PixelFormatInfo::L }, { 2, 16, {16, 8, 8, 0, 8, 0, 8, 0 }, PixelFormatInfo::LA }, { 1, 8, { 0, 0, 8, 5, 5, 2, 2, 0 }, PixelFormatInfo::RGB }, }; static const Info* gGetPixelFormatTable(size_t* numEntries) { Loading
services/surfaceflinger/Layer.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -160,7 +160,10 @@ status_t Layer::setBuffers( uint32_t w, uint32_t h, // this surfaces pixel format PixelFormatInfo info; status_t err = getPixelFormatInfo(format, &info); if (err) return err; if (err) { ALOGE("unsupported pixelformat %d", format); return err; } // the display's pixel format const DisplayHardware& hw(graphicPlane(0).displayHardware()); Loading @@ -170,6 +173,7 @@ status_t Layer::setBuffers( uint32_t w, uint32_t h, // never allow a surface larger than what our underlying GL implementation // can handle. if ((uint32_t(w)>maxSurfaceDims) || (uint32_t(h)>maxSurfaceDims)) { ALOGE("dimensions too large %u x %u", uint32_t(w), uint32_t(h)); return BAD_VALUE; } Loading
services/surfaceflinger/SurfaceFlinger.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1285,7 +1285,7 @@ sp<ISurface> SurfaceFlinger::createSurface( return surfaceHandle; } //ALOGD("createSurface for pid %d (%d x %d)", pid, w, h); //ALOGD("createSurface for (%d x %d), name=%s", w, h, name.string()); sp<Layer> normalLayer; switch (flags & eFXSurfaceMask) { case eFXSurfaceNormal: Loading