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

Unified Diff: components/suggestions/image_encoder_ios.mm

Issue 1156003008: Decode ImageManager cached images on demand. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't use MessageLoop API Created 5 years, 6 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 | « components/suggestions/image_encoder.cc ('k') | components/suggestions/image_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/suggestions/image_encoder_ios.mm
diff --git a/components/suggestions/image_encoder_ios.mm b/components/suggestions/image_encoder_ios.mm
index e81fb305948c4ef488cae600950f03917d6e6e30..ffac9a2a4599d73570551d1914b1aa56823bc120 100644
--- a/components/suggestions/image_encoder_ios.mm
+++ b/components/suggestions/image_encoder_ios.mm
@@ -11,11 +11,9 @@
namespace suggestions {
-SkBitmap* DecodeJPEGToSkBitmap(const std::vector<unsigned char>& encoded_data) {
- NSData* data =
- [NSData dataWithBytes:encoded_data.data() length:encoded_data.size()];
- UIImage* image =
- [UIImage imageWithData:data scale:1.0];
+SkBitmap* DecodeJPEGToSkBitmap(const void* encoded_data, size_t size) {
+ NSData* data = [NSData dataWithBytes:encoded_data length:size];
+ UIImage* image = [UIImage imageWithData:data scale:1.0];
return new SkBitmap(gfx::CGImageToSkBitmap(image.CGImage, [image size], YES));
}
« no previous file with comments | « components/suggestions/image_encoder.cc ('k') | components/suggestions/image_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698