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

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

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/codec/skia_image_encoder_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/codec/skia_image_encoder_adapter.h
diff --git a/ui/gfx/codec/skia_image_encoder_adapter.h b/ui/gfx/codec/skia_image_encoder_adapter.h
new file mode 100644
index 0000000000000000000000000000000000000000..f8789695ed7ad79261830e12be898ee09e5dfc47
--- /dev/null
+++ b/ui/gfx/codec/skia_image_encoder_adapter.h
@@ -0,0 +1,25 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GFX_CODEC_SKIA_IMAGE_ENCODER_ADAPTER_H
+#define UI_GFX_CODEC_SKIA_IMAGE_ENCODER_ADAPTER_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 EncodeSkiaImage(SkWStream* dst,
+ const SkPixmap& pixmap,
+ SkEncodedImageFormat format,
+ int quality);
+
+} // namespace gfx
+
+#endif // UI_GFX_CODEC_SKIA_IMAGE_ENCODER_ADAPTER_H
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/codec/skia_image_encoder_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698