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

Side by Side Diff: services/image_decoder/public/cpp/decode.h

Issue 2475543003: Introduce the image_decoder service (Closed)
Patch Set: . Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_IMAGE_DECODER_PUBLIC_CPP_DECODE_H_
6 #define SERVICES_IMAGE_DECODER_PUBLIC_CPP_DECODE_H_
7
8 #include <stdint.h>
9
10 #include <vector>
11
12 #include "services/image_decoder/public/interfaces/image_decoder.mojom.h"
13
14 namespace service_manager {
15 class Connector;
16 }
17
18 namespace image_decoder {
19
20 const uint64_t kDefaultMaxSizeInBytes = 128 * 1024 * 1024;
21
22 // Helper function to decode an image via the image_decoder service. Upon
23 // completion, |callback| is invoked on the calling thread TaskRunner with an
24 // SkBitmap argument. The SkBitmap will be null on failure and non-null on
25 // success.
26 void Decode(service_manager::Connector* connector,
27 const std::vector<uint8_t>& encoded_bytes,
28 mojom::ImageCodec codec,
29 bool shrink_to_fit,
30 uint64_t max_size_in_bytes,
31 const mojom::ImageDecoder::DecodeImageCallback& callback);
32
33 } // namespace image_decoder
34
35 #endif // SERVICES_IMAGE_DECODER_PUBLIC_CPP_DECODE_H_
OLDNEW
« no previous file with comments | « services/image_decoder/public/cpp/constants.cc ('k') | services/image_decoder/public/cpp/decode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698