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

Unified Diff: third_party/WebKit/Source/platform/bitmap_type_converters.h

Issue 1906773003: Enable SkBitmap to be used by Mojo in Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: third_party/WebKit/Source/platform/bitmap_type_converters.h
diff --git a/third_party/WebKit/Source/platform/bitmap_type_converters.h b/third_party/WebKit/Source/platform/bitmap_type_converters.h
new file mode 100644
index 0000000000000000000000000000000000000000..235311b00eea0b92c141329b156d1b7d76e1c36f
--- /dev/null
+++ b/third_party/WebKit/Source/platform/bitmap_type_converters.h
@@ -0,0 +1,27 @@
+// Copyright 2015 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 BITMAP_TYPE_CONVERTERS_H
+#define BITMAP_TYPE_CONVERTERS_H
+
+#include "platform/PlatformExport.h"
+#include "third_party/WebKit/public/platform/bitmap.mojom-wtf.h"
+
+class SkBitmap;
+
+namespace mojo {
+
+template <>
+struct TypeConverter<SkBitmap, blink::mojom::wtf::BitmapPtr> {
+ static PLATFORM_EXPORT SkBitmap Convert(const blink::mojom::wtf::BitmapPtr& image);
+};
+
+template <>
+struct TypeConverter<blink::mojom::wtf::BitmapPtr, SkBitmap> {
+ static PLATFORM_EXPORT blink::mojom::wtf::BitmapPtr Convert(const SkBitmap& bitmap);
+};
+
+} // namespace mojo
+
+#endif // BITMAP_TYPE_CONVERTERS_H
« no previous file with comments | « third_party/WebKit/Source/platform/BUILD.gn ('k') | third_party/WebKit/Source/platform/bitmap_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698