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

Unified Diff: ui/gfx/codec/install_skia_codec.h

Issue 2527833002: Implement SkEncodeImage() (Closed)
Patch Set: remove size check Created 4 years 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
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

Powered by Google App Engine
This is Rietveld 408576698