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

Unified Diff: chrome/utility/image_decoder_impl.cc

Issue 1906773003: Enable SkBitmap to be used by Mojo in Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « 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 91cea1b616f391e9a75e816ba93f7d6c1072848e..730a311d72335863afaa8b9fbc2646811e221b68 100644
--- a/chrome/utility/image_decoder_impl.cc
+++ b/chrome/utility/image_decoder_impl.cc
@@ -42,7 +42,7 @@ 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(blink::mojom::BitmapPtr)>& callback) {
if (encoded_data.size() == 0) {
callback.Run(nullptr);
return;
@@ -75,9 +75,9 @@ void ImageDecoderImpl::DecodeImage(
}
if (!decoded_image.isNull()) {
- skia::mojom::BitmapPtr dummy_image = skia::mojom::Bitmap::New();
+ blink::mojom::BitmapPtr dummy_image = blink::mojom::Bitmap::New();
int64_t struct_size =
- skia::mojom::GetSerializedSize_(dummy_image, nullptr) + kPadding;
+ blink::mojom::GetSerializedSize_(dummy_image, nullptr) + kPadding;
int64_t image_size = decoded_image.computeSize64();
int halves = 0;
while (struct_size + (image_size >> 2 * halves) > max_message_size_)
@@ -100,5 +100,5 @@ void ImageDecoderImpl::DecodeImage(
if (decoded_image.isNull())
callback.Run(nullptr);
else
- callback.Run(skia::mojom::Bitmap::From(decoded_image));
+ callback.Run(blink::mojom::Bitmap::From(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