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

Unified Diff: components/suggestions/image_encoder_ios.h

Issue 641513003: [Suggestions] Introduce a different image encoder/decoder for iOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest Created 6 years, 2 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_encoder_ios.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/suggestions/image_encoder_ios.h
diff --git a/components/suggestions/image_encoder_ios.h b/components/suggestions/image_encoder_ios.h
new file mode 100644
index 0000000000000000000000000000000000000000..50741ac589bba48e9286a543051666df9ab7eccb
--- /dev/null
+++ b/components/suggestions/image_encoder_ios.h
@@ -0,0 +1,24 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_SUGGESTIONS_IMAGE_ENCODER_IOS_H_
+#define COMPONENTS_SUGGESTIONS_IMAGE_ENCODER_IOS_H_
+
+#include <vector>
+
+class SkBitmap;
+
+namespace suggestions {
+
+// From encoded bytes to SkBitmap. It's the caller's responsibility to delete
blundell 2014/10/10 19:28:42 You actually don't even need this; just include im
+// the bitmap.
+SkBitmap* DecodeJPEGToSkBitmap(const std::vector<unsigned char>& encoded_data);
Stephen White 2014/10/10 19:32:35 BTW, you can actually just return an SkBitmap by v
+
+// From SkBitmap to a vector of JPEG-encoded bytes, |dst|.
+bool EncodeSkBitmapToJPEG(const SkBitmap& bitmap,
+ std::vector<unsigned char>* dest);
+
+} // namespace suggestions
+
+#endif // COMPONENTS_SUGGESTIONS_IMAGE_ENCODER_IOS_H_
« no previous file with comments | « components/suggestions/image_encoder.cc ('k') | components/suggestions/image_encoder_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698