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

Unified Diff: ui/gfx/codec/jpeg_codec.h

Issue 1879443002: JPEG decoding: replace ownership comments with std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fixes Created 4 years, 8 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 | « printing/emf_win.cc ('k') | ui/gfx/codec/jpeg_codec.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/codec/jpeg_codec.h
diff --git a/ui/gfx/codec/jpeg_codec.h b/ui/gfx/codec/jpeg_codec.h
index 8219221283e7979b62a9cfb4c4afac240dfffbfb..3cc510bdb0669cae444ce4906105aca1fb4fe5bf 100644
--- a/ui/gfx/codec/jpeg_codec.h
+++ b/ui/gfx/codec/jpeg_codec.h
@@ -6,6 +6,8 @@
#define UI_GFX_CODEC_JPEG_CODEC_H_
#include <stddef.h>
+
+#include <memory>
#include <vector>
#include "ui/gfx/gfx_export.h"
@@ -69,9 +71,9 @@ class GFX_EXPORT JPEGCodec {
int* w, int* h);
// Decodes the JPEG data contained in input of length input_size. If
- // successful, a SkBitmap is created and returned. It is up to the caller
- // to delete the returned bitmap.
- static SkBitmap* Decode(const unsigned char* input, size_t input_size);
+ // successful, a SkBitmap is created and returned.
+ static std::unique_ptr<SkBitmap> Decode(const unsigned char* input,
+ size_t input_size);
};
} // namespace gfx
« no previous file with comments | « printing/emf_win.cc ('k') | ui/gfx/codec/jpeg_codec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698