Chromium Code Reviews| Index: skia/public/interfaces/bitmap_skbitmap_struct_traits.cc |
| diff --git a/skia/public/interfaces/bitmap_skbitmap_struct_traits.cc b/skia/public/interfaces/bitmap_skbitmap_struct_traits.cc |
| index 35f18be16bce02aed0f2ae89599bcf7901599e83..d093d53579f49ecd20b2997b23a6c419c4627f53 100644 |
| --- a/skia/public/interfaces/bitmap_skbitmap_struct_traits.cc |
| +++ b/skia/public/interfaces/bitmap_skbitmap_struct_traits.cc |
| @@ -180,14 +180,12 @@ bool StructTraits<skia::mojom::BitmapDataView, SkBitmap>::Read( |
| if (data.width() == 0 || data.height() == 0) |
| return true; |
| - SkAutoPixmapUnlock pixmap; |
| mojo::ArrayDataView<uint8_t> data_view; |
| data.GetPixelDataDataView(&data_view); |
| if (static_cast<uint32_t>(b->width()) != data.width() || |
| static_cast<uint32_t>(b->height()) != data.height() || |
| static_cast<uint64_t>(b->rowBytes()) != data.row_bytes() || |
| - b->getSize() != data_view.size() || !b->requestLock(&pixmap) || |
| - !b->readyToDraw()) { |
| + b->getSize() != data_view.size() || !b->readyToDraw()) { |
| return false; |
| } |
| @@ -203,7 +201,6 @@ bool StructTraits<skia::mojom::BitmapDataView, SkBitmap>::Read( |
| // static |
| void* StructTraits<skia::mojom::BitmapDataView, SkBitmap>::SetUpContext( |
|
dcheng
2017/04/17 22:03:10
Nit: please remove these members, since they're no
reed1
2017/04/18 12:53:01
Done.
|
| const SkBitmap& b) { |
| - b.lockPixels(); |
| return nullptr; |
| } |
| @@ -211,7 +208,6 @@ void* StructTraits<skia::mojom::BitmapDataView, SkBitmap>::SetUpContext( |
| void StructTraits<skia::mojom::BitmapDataView, SkBitmap>::TearDownContext( |
| const SkBitmap& b, |
| void* context) { |
| - b.unlockPixels(); |
| } |
| } // namespace mojo |