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

Unified Diff: skia/public/interfaces/bitmap_skbitmap_struct_traits.cc

Issue 2823003002: SkBitmap and SkPixelRef no longer need lock/unlock (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « skia/ext/platform_canvas_unittest.cc ('k') | third_party/WebKit/Source/platform/DragImageTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « skia/ext/platform_canvas_unittest.cc ('k') | third_party/WebKit/Source/platform/DragImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698