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

Unified Diff: ui/gfx/image/mojo/image_skia_struct_traits.h

Issue 2772113004: Make skia.mojom.Bitmap use shared buffer (Closed)
Patch Set: fix gn check Created 3 years, 9 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: ui/gfx/image/mojo/image_skia_struct_traits.h
diff --git a/ui/gfx/image/mojo/image_skia_struct_traits.h b/ui/gfx/image/mojo/image_skia_struct_traits.h
index 974ec9cf1d75a6d58039da63376b4c67a64dafef..d2e2cc40153871cb01363ad33160c9921f6ba32a 100644
--- a/ui/gfx/image/mojo/image_skia_struct_traits.h
+++ b/ui/gfx/image/mojo/image_skia_struct_traits.h
@@ -9,7 +9,6 @@
#include <vector>
-#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_rep.h"
#include "ui/gfx/image/mojo/image.mojom-shared.h"
@@ -17,30 +16,6 @@
namespace mojo {
template <>
-struct StructTraits<gfx::mojom::SharedBufferSkBitmapDataView, SkBitmap> {
- struct Context {
- Context();
- ~Context();
-
- mojo::ScopedSharedBufferHandle shared_buffer_handle;
- uint64_t buffer_byte_size = 0;
- };
-
- static void* SetUpContext(const SkBitmap& input);
- static void TearDownContext(const SkBitmap& input, void* context);
- static mojo::ScopedSharedBufferHandle shared_buffer_handle(
- const SkBitmap& input,
- void* context);
- static uint64_t buffer_byte_size(const SkBitmap& input, void* context);
-
- static bool IsNull(const SkBitmap& input) { return input.isNull(); }
- static void SetToNull(SkBitmap* out) { out->reset(); }
-
- static bool Read(gfx::mojom::SharedBufferSkBitmapDataView data,
- SkBitmap* out);
-};
-
-template <>
struct StructTraits<gfx::mojom::ImageSkiaRepDataView, gfx::ImageSkiaRep> {
static SkBitmap bitmap(const gfx::ImageSkiaRep& input) {
return input.sk_bitmap();

Powered by Google App Engine
This is Rietveld 408576698