Guard globalRef() virtual with #ifdef ANDROID, as these are not implemented

nor called by Skia proper.



git-svn-id: http://skia.googlecode.com/svn/trunk@850 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-02-24 18:09:46 +00:00
parent 875b4ecef7
commit 93c5f9e787
2 changed files with 30 additions and 22 deletions

View File

@ -119,17 +119,21 @@ public:
virtual Factory getFactory() const { return NULL; }
virtual void flatten(SkFlattenableWriteBuffer&) const;
/** Acquire a "global" ref on this object.
* The default implementation just calls ref(), but subclasses can override
* this method to implement additional behavior.
*/
#ifdef ANDROID
/**
* Acquire a "global" ref on this object.
* The default implementation just calls ref(), but subclasses can override
* this method to implement additional behavior.
*/
virtual void globalRef(void* data=NULL);
/** Release a "global" ref on this object.
* The default implementation just calls unref(), but subclasses can override
* this method to implement additional behavior.
*/
/**
* Release a "global" ref on this object.
* The default implementation just calls unref(), but subclasses can override
* this method to implement additional behavior.
*/
virtual void globalUnref();
#endif
static Factory NameToFactory(const char name[]);
static const char* FactoryToName(Factory);

View File

@ -128,6 +128,9 @@ const char* SkPixelRef::FactoryToName(Factory fact) {
return NULL;
}
///////////////////////////////////////////////////////////////////////////////
#ifdef ANDROID
void SkPixelRef::globalRef(void* data) {
this->ref();
}
@ -135,3 +138,4 @@ void SkPixelRef::globalRef(void* data) {
void SkPixelRef::globalUnref() {
this->unref();
}
#endif