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

Unified Diff: src/codec/SkWebpCodec.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/codec/SkSampledCodec.cpp ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkWebpCodec.cpp
diff --git a/src/codec/SkWebpCodec.cpp b/src/codec/SkWebpCodec.cpp
index 2137877f1e7f2986144f2694ed02537993b3f297..6cfb3852948837b16d5e3f9f415b8e86d3e5e3df 100644
--- a/src/codec/SkWebpCodec.cpp
+++ b/src/codec/SkWebpCodec.cpp
@@ -230,8 +230,8 @@ SkCodec::Result SkWebpCodec::onGetPixels(const SkImageInfo& dstInfo, void* dst,
return kInvalidInput;
}
- SkAutoMalloc storage(BUFFER_SIZE);
- uint8_t* buffer = static_cast<uint8_t*>(storage.get());
+ SkAutoTMalloc<uint8_t> storage(BUFFER_SIZE);
+ uint8_t* buffer = storage.get();
while (true) {
const size_t bytesRead = stream()->read(buffer, BUFFER_SIZE);
if (0 == bytesRead) {
« no previous file with comments | « src/codec/SkSampledCodec.cpp ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698