Index: src/image/SkSurface.cpp |
=================================================================== |
--- src/image/SkSurface.cpp (revision 8683) |
+++ src/image/SkSurface.cpp (working copy) |
@@ -59,21 +59,21 @@ |
return fCachedImage; |
} |
-void SkSurface_Base::aboutToDraw(SkCanvas* canvas) { |
+void SkSurface_Base::aboutToDraw() { |
this->dirtyGenerationID(); |
- if (canvas) { |
- SkASSERT(canvas == fCachedCanvas); |
- SkASSERT(canvas->getSurfaceBase() == this); |
- canvas->setSurfaceBase(NULL); |
+ if (NULL != fCachedCanvas) { |
+ SkASSERT(fCachedCanvas->getSurfaceBase() == this || \ |
+ NULL == fCachedCanvas->getSurfaceBase()); |
+ fCachedCanvas->setSurfaceBase(NULL); |
} |
- if (fCachedImage) { |
+ if (NULL != fCachedImage) { |
// the surface may need to fork its backend, if its sharing it with |
// the cached image. Note: we only call if there is an outstanding owner |
// on the image (besides us). |
if (fCachedImage->getRefCnt() > 1) { |
- this->onCopyOnWrite(fCachedImage, canvas); |
+ this->onCopyOnWrite(); |
} |
// regardless of copy-on-write, we must drop our cached image now, so |
@@ -110,7 +110,7 @@ |
} |
void SkSurface::notifyContentChanged() { |
- asSB(this)->aboutToDraw(NULL); |
+ asSB(this)->aboutToDraw(); |
} |
SkCanvas* SkSurface::getCanvas() { |