#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
usingnamespaceandroid;
staticinlineSkBitmap::Config convertPixelFormat(PixelFormat format) {
/* note: if PIXEL_FORMAT_RGBX_8888 means that all alpha bytes are 0xFF, then
we can map to SkBitmap::kARGB_8888_Config, and optionally call
bitmap.setIsOpaque(true) on the resulting SkBitmap (as an accelerator)
*/
switch(format) {
casePIXEL_FORMAT_RGBX_8888:returnSkBitmap::kARGB_8888_Config;
casePIXEL_FORMAT_RGBA_8888:returnSkBitmap::kARGB_8888_Config;
casePIXEL_FORMAT_RGB_565:returnSkBitmap: