Chromium Code Reviews| 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_ |