Index: src/image/SkImage_Raster.cpp |
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp |
index 807c19e79d4941522f75b43d67c88a896829b102..819c08f0514d39cef69492b4e7b7d1f5cfa13e63 100644 |
--- a/src/image/SkImage_Raster.cpp |
+++ b/src/image/SkImage_Raster.cpp |
@@ -10,7 +10,7 @@ |
#include "SkBitmap.h" |
#include "SkCanvas.h" |
#include "SkData.h" |
-#include "SkDataPixelRef.h" |
+#include "SkMallocPixelRef.h" |
class SkImage_Raster : public SkImage_Base { |
public: |
@@ -85,7 +85,9 @@ SkImage* SkImage_Raster::NewEmpty() { |
SkImage_Raster::SkImage_Raster(const Info& info, SkData* data, size_t rowBytes) |
: INHERITED(info.fWidth, info.fHeight) { |
fBitmap.setConfig(info, rowBytes); |
- fBitmap.setPixelRef(SkNEW_ARGS(SkDataPixelRef, (info, data)))->unref(); |
+ SkAutoTUnref<SkPixelRef> ref( |
+ SkMallocPixelRef::NewWithData(info, rowBytes, NULL, data, 0)); |
+ fBitmap.setPixelRef(ref, 0); |
fBitmap.setImmutable(); |
} |