зеркало из https://github.com/mozilla/moz-skia.git
add SKIA_VERSION_[MAJOR, MINOR, PATCH] in header and SkGraphics API
git-svn-id: http://skia.googlecode.com/svn/trunk@542 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
2687ae05cb
Коммит
9aa8b32233
|
@ -33,7 +33,12 @@ public:
|
|||
Returns true if some amount was purged from the font cache.
|
||||
*/
|
||||
static bool SetFontCacheUsed(size_t usageInBytes);
|
||||
|
||||
|
||||
/** Return the version numbers for the library. If the parameter is not
|
||||
null, it is set to the version number.
|
||||
*/
|
||||
static void GetVersion(int32_t* major, int32_t* minor, int32_t* patch);
|
||||
|
||||
private:
|
||||
/** This is automatically called by SkGraphics::Init(), and must be
|
||||
implemented by the host OS. This allows the host OS to register a callback
|
||||
|
|
|
@ -30,6 +30,12 @@
|
|||
/** \file SkTypes.h
|
||||
*/
|
||||
|
||||
/** See SkGraphics::GetVersion() to retrieve these at runtime
|
||||
*/
|
||||
#define SKIA_VERSION_MAJOR 1
|
||||
#define SKIA_VERSION_MINOR 0
|
||||
#define SKIA_VERSION_PATCH 0
|
||||
|
||||
/*
|
||||
memory wrappers to be implemented by the porting layer (platform)
|
||||
*/
|
||||
|
|
|
@ -374,3 +374,15 @@ bool SkGraphics::SetFontCacheUsed(size_t usageInBytes) {
|
|||
return SkGlyphCache::SetCacheUsed(usageInBytes);
|
||||
}
|
||||
|
||||
void SkGraphics::GetVersion(int32_t* major, int32_t* minor, int32_t* patch) {
|
||||
if (major) {
|
||||
*major = SKIA_VERSION_MAJOR;
|
||||
}
|
||||
if (minor) {
|
||||
*minor = SKIA_VERSION_MINOR;
|
||||
}
|
||||
if (patch) {
|
||||
*patch = SKIA_VERSION_PATCH;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче