Index: skia/public/interfaces/bitmap_skbitmap_struct_traits.h |
diff --git a/skia/public/interfaces/bitmap_skbitmap_struct_traits.h b/skia/public/interfaces/bitmap_skbitmap_struct_traits.h |
index 8c7cf778a44803b87d67a236b2299ec59dfa460f..ac3855af66a277f01027c5b42ce650ebca9a58bc 100644 |
--- a/skia/public/interfaces/bitmap_skbitmap_struct_traits.h |
+++ b/skia/public/interfaces/bitmap_skbitmap_struct_traits.h |
@@ -5,15 +5,11 @@ |
#ifndef SKIA_PUBLIC_INTERFACES_BITMAP_SKBITMAP_STRUCT_TRAITS_H_ |
#define SKIA_PUBLIC_INTERFACES_BITMAP_SKBITMAP_STRUCT_TRAITS_H_ |
-#include "mojo/public/cpp/bindings/array_traits.h" |
#include "skia/public/interfaces/bitmap.mojom.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
namespace mojo { |
-// A buffer used to read pixel data directly from BitmapDataView to SkBitmap. |
-using BitmapBuffer = CArray<uint8_t>; |
- |
// Struct traits to use SkBitmap for skia::mojom::Bitmap in Chrome C++ code. |
template <> |
struct StructTraits<skia::mojom::BitmapDataView, SkBitmap> { |
@@ -25,7 +21,9 @@ struct StructTraits<skia::mojom::BitmapDataView, SkBitmap> { |
static uint32_t width(const SkBitmap& b); |
static uint32_t height(const SkBitmap& b); |
static uint64_t row_bytes(const SkBitmap& b); |
- static BitmapBuffer pixel_data(const SkBitmap& b); |
+ static mojo::ScopedSharedBufferHandle pixel_data_buffer_handle( |
+ const SkBitmap& b, |
+ void* context); |
static bool Read(skia::mojom::BitmapDataView data, SkBitmap* b); |
static void* SetUpContext(const SkBitmap& b); |
static void TearDownContext(const SkBitmap& b, void* context); |