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

Unified Diff: src/core/SkDraw.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/core/SkBitmap.cpp ('k') | src/effects/SkColorCubeFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDraw.cpp
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index addd6ec5555be4eb01cf09f58118ba5ba7c6ebbb..7ebad61ddefa1dca87fb6b5efed388a165cc8a27 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -1234,8 +1234,8 @@ void SkDraw::drawBitmapAsMask(const SkBitmap& bitmap,
}
// allocate (and clear) our temp buffer to hold the transformed bitmap
- SkAutoMalloc storage(size);
- mask.fImage = (uint8_t*)storage.get();
+ SkAutoTMalloc<uint8_t> storage(size);
+ mask.fImage = storage.get();
memset(mask.fImage, 0, size);
// now draw our bitmap(src) into mask(dst), transformed by the matrix
« no previous file with comments | « src/core/SkBitmap.cpp ('k') | src/effects/SkColorCubeFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698