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

Unified Diff: ui/gfx/skia_util.cc

Issue 2823003002: SkBitmap and SkPixelRef no longer need lock/unlock (Closed)
Patch Set: win fix after 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 | « ui/gfx/skbitmap_operations_unittest.cc ('k') | ui/views/controls/image_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/skia_util.cc
diff --git a/ui/gfx/skia_util.cc b/ui/gfx/skia_util.cc
index c23eab2b9ea829773d12052763cfa1f59774fb21..c0c4a5417206099b94ab51f1497656d5cd2b03ab 100644
--- a/ui/gfx/skia_util.cc
+++ b/ui/gfx/skia_util.cc
@@ -97,15 +97,11 @@ bool BitmapsAreEqual(const SkBitmap& bitmap1, const SkBitmap& bitmap2) {
size_t size1 = 0;
size_t size2 = 0;
- bitmap1.lockPixels();
addr1 = bitmap1.getAddr32(0, 0);
size1 = bitmap1.getSize();
- bitmap1.unlockPixels();
- bitmap2.lockPixels();
addr2 = bitmap2.getAddr32(0, 0);
size2 = bitmap2.getSize();
- bitmap2.unlockPixels();
return (size1 == size2) && (0 == memcmp(addr1, addr2, bitmap1.getSize()));
}
« no previous file with comments | « ui/gfx/skbitmap_operations_unittest.cc ('k') | ui/views/controls/image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698