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

Unified Diff: src/core/SkColorTable.cpp

Issue 1311893010: Specialize SkOncePtr<T[]>. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 months 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 | « include/private/SkOncePtr.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkColorTable.cpp
diff --git a/src/core/SkColorTable.cpp b/src/core/SkColorTable.cpp
index f52ac909eb0d626fea2323000a6a561bcadb581f..8e889d44c4929a29584b0e099bee07090268b0e3 100644
--- a/src/core/SkColorTable.cpp
+++ b/src/core/SkColorTable.cpp
@@ -49,7 +49,7 @@ SkColorTable::~SkColorTable() {
const uint16_t* SkColorTable::read16BitCache() const {
return f16BitCache.get([&]{
- uint16_t* cache = (uint16_t*)sk_malloc_throw(fCount * sizeof(uint16_t));
+ auto cache = new uint16_t[fCount];
for (int i = 0; i < fCount; i++) {
cache[i] = SkPixel32ToPixel16_ToU16(fColors[i]);
}
« no previous file with comments | « include/private/SkOncePtr.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698