Index: ui/gfx/codec/install_skia_codec.h |
diff --git a/ui/gfx/codec/install_skia_codec.h b/ui/gfx/codec/install_skia_codec.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b8c2e21a3e56f437c194b559129eed03592b76d1 |
--- /dev/null |
+++ b/ui/gfx/codec/install_skia_codec.h |
@@ -0,0 +1,25 @@ |
+// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
dcheng
2016/12/20 19:40:47
Nit: rename this file to something like skia_image
hal.canary
2016/12/20 20:45:08
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_GFX_CODEC_INSTALL_SKIA_CODEC_H |
+#define UI_GFX_CODEC_INSTALL_SKIA_CODEC_H |
+ |
+#include "third_party/skia/include/core/SkEncodedImageFormat.h" |
+#include "ui/gfx/gfx_export.h" |
+ |
+class SkWStream; |
+class SkPixmap; |
+ |
+namespace gfx { |
+ |
+// Matches signature of Skia's SkEncodeImage, but makes use of Chromium's |
+// encoders. |
+GFX_EXPORT bool EncodeImage(SkWStream* dst, |
dcheng
2016/12/20 19:40:47
Nit: call this something less generic, since it's
hal.canary
2016/12/20 20:45:09
Done.
|
+ const SkPixmap& pixmap, |
+ SkEncodedImageFormat format, |
+ int quality); |
+ |
+} // namespace gfx |
+ |
+#endif // UI_GFX_CODEC_INSTALL_SKIA_CODEC_H |