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

Unified Diff: tests/BitmapCopyTest.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 | « tests/ARGBImageEncoderTest.cpp ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/BitmapCopyTest.cpp
diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp
index 65427ffd7bbaf28253760a9a40f13e90b1ad869a..6db63fae4598b7dd964564abdaf3a3ef015006be 100644
--- a/tests/BitmapCopyTest.cpp
+++ b/tests/BitmapCopyTest.cpp
@@ -7,6 +7,7 @@
#include "SkBitmap.h"
#include "SkRect.h"
+#include "SkTemplates.h"
#include "Test.h"
static const char* boolStr(bool value) {
@@ -420,8 +421,8 @@ DEF_TEST(BitmapCopy, reporter) {
// raw buffer pointer.
const size_t bufSize = subH *
SkColorTypeMinRowBytes(src.colorType(), subW) * 2;
- SkAutoMalloc autoBuf (bufSize);
- uint8_t* buf = static_cast<uint8_t*>(autoBuf.get());
+ SkAutoTMalloc<uint8_t> autoBuf (bufSize);
+ uint8_t* buf = autoBuf.get();
SkBitmap bufBm; // Attach buf to this bitmap.
bool successExpected;
« no previous file with comments | « tests/ARGBImageEncoderTest.cpp ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698