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

Side by Side Diff: skia/ext/skia_encode_image.cc

Issue 2527833002: Implement SkEncodeImage() (Closed)
Patch Set: rebase again Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « skia/ext/skia_encode_image.h ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 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 #include "skia/ext/skia_encode_image.h"
6
7 #include "third_party/skia/include/core/SkImageEncoder.h"
8
9 static skia::ImageEncoderFunction g_image_encoder = nullptr;
10
11 void skia::SetImageEncoder(skia::ImageEncoderFunction image_encoder) {
12 g_image_encoder = image_encoder;
13 }
14
15 bool SkEncodeImage(SkWStream* stream,
16 const SkPixmap& pixmap,
17 SkEncodedImageFormat format,
18 int quality) {
19 skia::ImageEncoderFunction encoder = g_image_encoder;
20 return encoder && encoder(stream, pixmap, format, quality);
21 }
OLDNEW
« no previous file with comments | « skia/ext/skia_encode_image.h ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698