aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-24 18:09:46 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-24 18:09:46 +0000
commit93c5f9e787ae06b113c422e4aaabb48c278ea9c5 (patch)
tree0fc3adc235dc1f169c7929e4d9fd5eee9da1c5ef /src
parent875b4ecef79fd61f7d23260928638bcca4133751 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/core/SkPixelRef.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp
index c376412c6f..f558f52c2d 100644
--- a/src/core/SkPixelRef.cpp
+++ b/src/core/SkPixelRef.cpp
@@ -35,7 +35,7 @@ void SkPixelRef::flatten(SkFlattenableWriteBuffer& buffer) const {
void SkPixelRef::lockPixels() {
SkAutoMutexAcquire ac(*fMutex);
-
+
if (1 == ++fLockCount) {
fPixels = this->onLockPixels(&fColorTable);
}
@@ -43,7 +43,7 @@ void SkPixelRef::lockPixels() {
void SkPixelRef::unlockPixels() {
SkAutoMutexAcquire ac(*fMutex);
-
+
SkASSERT(fLockCount > 0);
if (0 == --fLockCount) {
this->onUnlockPixels();
@@ -94,15 +94,15 @@ static Pair gPairs[MAX_PAIR_COUNT];
void SkPixelRef::Register(const char name[], Factory factory) {
SkASSERT(name);
SkASSERT(factory);
-
+
static bool gOnce;
if (!gOnce) {
gCount = 0;
gOnce = true;
}
-
+
SkASSERT(gCount < MAX_PAIR_COUNT);
-
+
gPairs[gCount].fName = name;
gPairs[gCount].fFactory = factory;
gCount += 1;
@@ -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