Go to the documentation of this file.00001 #if !defined(HFILE_libskia) && ANDROID_VER>=420
00002 #define HFILE_libskia
00003
00004 #include <sys/types.h>
00005
00006 struct SkColorTable;
00007
00008 struct SkBitmap {
00009 SkBitmap();
00010 ~SkBitmap();
00011 enum Config {
00012 #if (ANDROID_VER>=440)
00013 kARGB_8888_Config = 5
00014 #elif (ANDROID_VER>=420)
00015 kARGB_8888_Config = 6
00016 #endif
00017 };
00018 #if (ANDROID_VER>=440)
00019 bool setConfig(SkBitmap::Config c, int w, int h, size_t rowBytes);
00020 #elif (ANDROID_VER>=420)
00021 bool setConfig(SkBitmap::Config c, int w, int h, int rowBytes);
00022 #endif
00023 void setPixels(void* base, SkColorTable* color=0);
00024
00025 char data[sizeof(void*)*128];
00026 };
00027
00028 struct SkData {
00029 virtual ~SkData();
00030 mutable int32_t fRefCnt;
00031 void* fReleaseProc;
00032 void* fReleaseProcContext;
00033 const void* p;
00034 size_t size;
00035 };
00036
00037 struct SkWStream {
00038 char data[sizeof(void*)*128];
00039 };
00040
00041 struct SkDynamicMemoryWStream : public SkWStream {
00042 SkDynamicMemoryWStream();
00043 ~SkDynamicMemoryWStream();
00044 SkData* copyToData() const;
00045 };
00046
00047 struct SkImageEncoder {
00048 enum Type {
00049 #if (ANDROID_VER>=440)
00050 kJPEG_Type = 4
00051 #elif (ANDROID_VER>=420)
00052 kJPEG_Type = 0
00053 #endif
00054 };
00055 static bool EncodeStream(SkWStream* s, SkBitmap const& b, SkImageEncoder::Type t, int q);
00056 };
00057
00058
00059 #endif //end of lib