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

Unified Diff: chrome/utility/image_decoder_impl.cc

Issue 2014013002: Add SkBitmap StructTraits for skia::mojo::Bitmap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 4 years, 7 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 | « chrome/utility/image_decoder_impl.h ('k') | chrome/utility/image_decoder_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/image_decoder_impl.cc
diff --git a/chrome/utility/image_decoder_impl.cc b/chrome/utility/image_decoder_impl.cc
index 2873b51e2a60d0637f387a7a895b6b286df810d8..4215e6e9a0ea5b4455f511a7da3a3a8425194df4 100644
--- a/chrome/utility/image_decoder_impl.cc
+++ b/chrome/utility/image_decoder_impl.cc
@@ -12,7 +12,6 @@
#include "content/public/child/image_decoder_utils.h"
#include "ipc/ipc_channel.h"
#include "skia/ext/image_operations.h"
-#include "skia/public/type_converters.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/geometry/size.h"
@@ -42,9 +41,9 @@ void ImageDecoderImpl::DecodeImage(
mojo::Array<uint8_t> encoded_data,
mojom::ImageCodec codec,
bool shrink_to_fit,
- const mojo::Callback<void(skia::mojom::BitmapPtr)>& callback) {
+ const mojo::Callback<void(const SkBitmap&)>& callback) {
if (encoded_data.size() == 0) {
- callback.Run(nullptr);
+ callback.Run(SkBitmap());
return;
}
@@ -99,8 +98,5 @@ void ImageDecoderImpl::DecodeImage(
}
}
- if (decoded_image.isNull())
- callback.Run(nullptr);
- else
- callback.Run(skia::mojom::Bitmap::From(decoded_image));
+ callback.Run(decoded_image);
}
« no previous file with comments | « chrome/utility/image_decoder_impl.h ('k') | chrome/utility/image_decoder_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698