diff options
-rw-r--r-- | src/image/SkImagePriv.h | 2 | ||||
-rw-r--r-- | src/image/SkImage_Gpu.cpp | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/image/SkImagePriv.h b/src/image/SkImagePriv.h index db3a089a35..7306934b9a 100644 --- a/src/image/SkImagePriv.h +++ b/src/image/SkImagePriv.h @@ -45,6 +45,6 @@ extern GrTexture* SkTextureImageGetTexture(SkImage* textureImage); // surface needs to perform a copy-on-write extern void SkTextureImageSetTexture(SkImage* image, GrTexture* texture); -extern SkImage* SkNewImageFromBitmapTexture(const SkBitmap&, int sampleCount); +extern SkImage* SkNewImageFromBitmapTexture(const SkBitmap&, int sampleCountForNewSurfaces); #endif diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp index 7a8da36d28..61fa142efd 100644 --- a/src/image/SkImage_Gpu.cpp +++ b/src/image/SkImage_Gpu.cpp @@ -17,7 +17,7 @@ class SkImage_Gpu : public SkImage_Base { public: SK_DECLARE_INST_COUNT(SkImage_Gpu) - SkImage_Gpu(const SkBitmap&, int sampleCount); + SkImage_Gpu(const SkBitmap&, int sampleCountForNewSurfaces); void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const SK_OVERRIDE; void onDrawRect(SkCanvas*, const SkRect* src, const SkRect& dst, @@ -36,17 +36,17 @@ public: private: SkBitmap fBitmap; - const int fSampleCount; // 0 if we weren't built from a surface + const int fSampleCountForNewSurfaces; // 0 if we don't know typedef SkImage_Base INHERITED; }; /////////////////////////////////////////////////////////////////////////////// -SkImage_Gpu::SkImage_Gpu(const SkBitmap& bitmap, int sampleCount) +SkImage_Gpu::SkImage_Gpu(const SkBitmap& bitmap, int sampleCountForNewSurfaces) : INHERITED(bitmap.width(), bitmap.height(), NULL) , fBitmap(bitmap) - , fSampleCount(sampleCount) + , fSampleCountForNewSurfaces(sampleCountForNewSurfaces) { SkASSERT(fBitmap.getTexture()); } @@ -69,7 +69,7 @@ void SkImage_Gpu::onDrawRect(SkCanvas* canvas, const SkRect* src, const SkRect& SkSurface* SkImage_Gpu::onNewSurface(const SkImageInfo& info, const SkSurfaceProps& props) const { GrContext* ctx = this->getTexture()->getContext(); - return SkSurface::NewRenderTarget(ctx, info, fSampleCount, &props); + return SkSurface::NewRenderTarget(ctx, info, fSampleCountForNewSurfaces, &props); } GrTexture* SkImage_Gpu::onGetTexture() const { @@ -86,11 +86,11 @@ bool SkImage_Gpu::isOpaque() const { /////////////////////////////////////////////////////////////////////////////// -SkImage* SkNewImageFromBitmapTexture(const SkBitmap& bitmap, int sampleCount) { +SkImage* SkNewImageFromBitmapTexture(const SkBitmap& bitmap, int sampleCountForNewSurfaces) { if (NULL == bitmap.getTexture()) { return NULL; } - return SkNEW_ARGS(SkImage_Gpu, (bitmap, sampleCount)); + return SkNEW_ARGS(SkImage_Gpu, (bitmap, sampleCountForNewSurfaces)); } SkImage* SkImage::NewTexture(const SkBitmap& bitmap) { |