Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1394)

Unified Diff: tests/ARGBImageEncoderTest.cpp

Issue 1516833003: Switch SkAutoMalloc to SkAutoTMalloc to avoid cast (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Go back to patch set 3 Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/svg/parser/SkSVG.cpp ('k') | tests/BitmapCopyTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ARGBImageEncoderTest.cpp
diff --git a/tests/ARGBImageEncoderTest.cpp b/tests/ARGBImageEncoderTest.cpp
index 4d16f4cc6d5cabeab7a0dc977de4804cfefd6e94..62167f0f2ab0f425a2bb8185d6de0fe5915e3bbf 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));
« no previous file with comments | « src/svg/parser/SkSVG.cpp ('k') | tests/BitmapCopyTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698