diff options
Diffstat (limited to 'tests/ARGBImageEncoderTest.cpp')
-rw-r--r-- | tests/ARGBImageEncoderTest.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/ARGBImageEncoderTest.cpp b/tests/ARGBImageEncoderTest.cpp index 4d16f4cc6d..62167f0f2a 100644 --- a/tests/ARGBImageEncoderTest.cpp +++ b/tests/ARGBImageEncoderTest.cpp @@ -10,6 +10,7 @@ #include "SkBitmap.h" #include "SkCanvas.h" #include "SkStream.h" +#include "SkTemplates.h" #include "Test.h" static SkColorType gColorTypes[] = { @@ -49,8 +50,8 @@ DEF_TEST(ARGBImageEncoder, reporter) { // Transform the bitmap. int bufferSize = bitmap.width() * bitmap.height() * 4; - SkAutoMalloc pixelBufferManager(bufferSize); - char *pixelBuffer = static_cast<char *>(pixelBufferManager.get()); + SkAutoTMalloc<char> pixelBufferManager(bufferSize); + char* pixelBuffer = pixelBufferManager.get(); SkMemoryWStream out(pixelBuffer, bufferSize); REPORTER_ASSERT(reporter, enc->encodeStream(&out, bitmap, SkImageEncoder::kDefaultQuality)); |