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

Unified Diff: ui/gfx/image/image_unittest_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/image/image_unittest.cc ('k') | ui/gfx/image/image_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_unittest_util.cc
diff --git a/ui/gfx/image/image_unittest_util.cc b/ui/gfx/image/image_unittest_util.cc
index f589f464a0ac69f2f86606e986b94cec1d6e95f5..32a8ed08af635b30e06f9f70fda8b999ebc7cabf 100644
--- a/ui/gfx/image/image_unittest_util.cc
+++ b/ui/gfx/image/image_unittest_util.cc
@@ -137,8 +137,6 @@ bool AreBitmapsClose(const SkBitmap& bmp1,
return false;
}
- SkAutoLockPixels lock1(bmp1);
- SkAutoLockPixels lock2(bmp2);
if (!bmp1.getPixels() || !bmp2.getPixels())
return false;
@@ -174,7 +172,6 @@ void CheckImageIndicatesPNGDecodeFailure(const gfx::Image& image) {
EXPECT_FALSE(bitmap.isNull());
EXPECT_LE(16, bitmap.width());
EXPECT_LE(16, bitmap.height());
- SkAutoLockPixels auto_lock(bitmap);
CheckColors(bitmap.getColor(10, 10), SK_ColorRED);
}
@@ -271,9 +268,7 @@ PlatformImage CopyPlatformType(const gfx::Image& image) {
// Defined in image_unittest_util_mac.mm.
#else
SkColor GetPlatformImageColor(PlatformImage image, int x, int y) {
- SkBitmap bitmap = *image.bitmap();
- SkAutoLockPixels auto_lock(bitmap);
- return bitmap.getColor(x, y);
+ return image.bitmap()->getColor(x, y);
}
#endif
« no previous file with comments | « ui/gfx/image/image_unittest.cc ('k') | ui/gfx/image/image_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698