OLD | NEW |
(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::ImageEncoder g_image_encoder = nullptr; |
| 10 |
| 11 void skia::SetImageEncoder(skia::ImageEncoder 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 return g_image_encoder && g_image_encoder(stream, pixmap, format, quality); |
| 20 } |
OLD | NEW |