diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/image/SkSurface.cpp | 6 | ||||
-rw-r--r-- | src/image/SkSurface_Base.h | 2 | ||||
-rw-r--r-- | src/image/SkSurface_Gpu.cpp | 4 | ||||
-rw-r--r-- | src/image/SkSurface_Picture.cpp | 4 | ||||
-rw-r--r-- | src/image/SkSurface_Raster.cpp | 4 | ||||
-rw-r--r-- | src/utils/SkDeferredCanvas.cpp | 10 |
6 files changed, 15 insertions, 15 deletions
diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp index 37995b1c1d..8cce965c51 100644 --- a/src/image/SkSurface.cpp +++ b/src/image/SkSurface.cpp @@ -36,7 +36,7 @@ SkSurface_Base::~SkSurface_Base() { void SkSurface_Base::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPaint* paint) { - SkImage* image = this->newImageShapshot(); + SkImage* image = this->newImageSnapshot(); if (image) { image->draw(canvas, x, y, paint); image->unref(); @@ -53,7 +53,7 @@ SkCanvas* SkSurface_Base::getCachedCanvas() { SkImage* SkSurface_Base::getCachedImage() { if (NULL == fCachedImage) { - fCachedImage = this->onNewImageShapshot(); + fCachedImage = this->onNewImageSnapshot(); this->installIntoCanvasForDirtyNotification(); } return fCachedImage; @@ -117,7 +117,7 @@ SkCanvas* SkSurface::getCanvas() { return asSB(this)->getCachedCanvas(); } -SkImage* SkSurface::newImageShapshot() { +SkImage* SkSurface::newImageSnapshot() { SkImage* image = asSB(this)->getCachedImage(); SkSafeRef(image); // the caller will call unref() to balance this return image; diff --git a/src/image/SkSurface_Base.h b/src/image/SkSurface_Base.h index b9c4890c66..bda271bf15 100644 --- a/src/image/SkSurface_Base.h +++ b/src/image/SkSurface_Base.h @@ -31,7 +31,7 @@ public: * must faithfully represent the current contents, even if the surface * is chaged after this calle (e.g. it is drawn to via its canvas). */ - virtual SkImage* onNewImageShapshot() = 0; + virtual SkImage* onNewImageSnapshot() = 0; /** * Default implementation: diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp index 3c581c34e3..ec709ca50e 100644 --- a/src/image/SkSurface_Gpu.cpp +++ b/src/image/SkSurface_Gpu.cpp @@ -20,7 +20,7 @@ public: virtual SkCanvas* onNewCanvas() SK_OVERRIDE; virtual SkSurface* onNewSurface(const SkImage::Info&) SK_OVERRIDE; - virtual SkImage* onNewImageShapshot() SK_OVERRIDE; + virtual SkImage* onNewImageSnapshot() SK_OVERRIDE; virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) SK_OVERRIDE; virtual void onCopyOnWrite(SkImage*, SkCanvas*) SK_OVERRIDE; @@ -71,7 +71,7 @@ SkSurface* SkSurface_Gpu::onNewSurface(const SkImage::Info& info) { return SkSurface::NewRenderTarget(fDevice->context(), info, sampleCount); } -SkImage* SkSurface_Gpu::onNewImageShapshot() { +SkImage* SkSurface_Gpu::onNewImageSnapshot() { GrRenderTarget* rt = (GrRenderTarget*) fDevice->accessRenderTarget(); diff --git a/src/image/SkSurface_Picture.cpp b/src/image/SkSurface_Picture.cpp index bdc84b7a15..d7b84ecaab 100644 --- a/src/image/SkSurface_Picture.cpp +++ b/src/image/SkSurface_Picture.cpp @@ -21,7 +21,7 @@ public: virtual SkCanvas* onNewCanvas() SK_OVERRIDE; virtual SkSurface* onNewSurface(const SkImage::Info&) SK_OVERRIDE; - virtual SkImage* onNewImageShapshot() SK_OVERRIDE; + virtual SkImage* onNewImageSnapshot() SK_OVERRIDE; virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) SK_OVERRIDE; virtual void onCopyOnWrite(SkImage*, SkCanvas*) SK_OVERRIDE; @@ -55,7 +55,7 @@ SkSurface* SkSurface_Picture::onNewSurface(const SkImage::Info& info) { return SkSurface::NewPicture(info.fWidth, info.fHeight); } -SkImage* SkSurface_Picture::onNewImageShapshot() { +SkImage* SkSurface_Picture::onNewImageSnapshot() { if (fPicture) { return SkNewImageFromPicture(fPicture); } else { diff --git a/src/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp index 6e972dda9e..b88d0e21ce 100644 --- a/src/image/SkSurface_Raster.cpp +++ b/src/image/SkSurface_Raster.cpp @@ -22,7 +22,7 @@ public: virtual SkCanvas* onNewCanvas() SK_OVERRIDE; virtual SkSurface* onNewSurface(const SkImage::Info&) SK_OVERRIDE; - virtual SkImage* onNewImageShapshot() SK_OVERRIDE; + virtual SkImage* onNewImageSnapshot() SK_OVERRIDE; virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) SK_OVERRIDE; virtual void onCopyOnWrite(SkImage*, SkCanvas*) SK_OVERRIDE; @@ -120,7 +120,7 @@ void SkSurface_Raster::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, canvas->drawBitmap(fBitmap, x, y, paint); } -SkImage* SkSurface_Raster::onNewImageShapshot() { +SkImage* SkSurface_Raster::onNewImageSnapshot() { return SkNewImageFromBitmap(fBitmap, fWeOwnThePixels); } diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp index 21f717cf53..af70fd2efd 100644 --- a/src/utils/SkDeferredCanvas.cpp +++ b/src/utils/SkDeferredCanvas.cpp @@ -147,7 +147,7 @@ public: SkCanvas* recordingCanvas(); SkCanvas* immediateCanvas() const {return fImmediateCanvas;} SkDevice* immediateDevice() const {return fImmediateDevice;} - SkImage* newImageShapshot(); + SkImage* newImageSnapshot(); bool isFreshFrame(); bool hasPendingCommands(); size_t storageAllocatedForRecording() const; @@ -400,9 +400,9 @@ SkCanvas* DeferredDevice::recordingCanvas() { return fRecordingCanvas; } -SkImage* DeferredDevice::newImageShapshot() { +SkImage* DeferredDevice::newImageSnapshot() { this->flush(); - return fSurface ? fSurface->newImageShapshot() : NULL; + return fSurface ? fSurface->newImageSnapshot() : NULL; } uint32_t DeferredDevice::getDeviceCapabilities() { @@ -620,10 +620,10 @@ SkDeferredCanvas::NotificationClient* SkDeferredCanvas::setNotificationClient( return notificationClient; } -SkImage* SkDeferredCanvas::newImageShapshot() { +SkImage* SkDeferredCanvas::newImageSnapshot() { DeferredDevice* deferredDevice = this->getDeferredDevice(); SkASSERT(deferredDevice); - return deferredDevice ? deferredDevice->newImageShapshot() : NULL; + return deferredDevice ? deferredDevice->newImageSnapshot() : NULL; } bool SkDeferredCanvas::isFullFrame(const SkRect* rect, |