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

Unified Diff: ui/gfx/icon_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/color_utils.cc ('k') | ui/gfx/image/image_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/icon_util.cc
diff --git a/ui/gfx/icon_util.cc b/ui/gfx/icon_util.cc
index f5b9b179f45fff9ba57724b859fbfdb1e37d726c..eb0bcdb23dc09c1b336e9f8f8b016dede4febe51 100644
--- a/ui/gfx/icon_util.cc
+++ b/ui/gfx/icon_util.cc
@@ -119,7 +119,6 @@ bool ConvertImageFamilyToBitmaps(
// Only 32 bit ARGB bitmaps are supported. We also make sure the bitmap has
// been properly initialized.
- SkAutoLockPixels bitmap_lock(bitmap);
if ((bitmap.colorType() != kN32_SkColorType) ||
(bitmap.getPixels() == NULL)) {
return false;
@@ -167,7 +166,6 @@ base::win::ScopedHICON IconUtil::CreateHICONFromSkBitmap(
const SkBitmap& bitmap) {
// Only 32 bit ARGB bitmaps are supported. We also try to perform as many
// validations as we can on the bitmap.
- SkAutoLockPixels bitmap_lock(bitmap);
if ((bitmap.colorType() != kN32_SkColorType) ||
(bitmap.width() <= 0) || (bitmap.height() <= 0) ||
(bitmap.getPixels() == NULL))
@@ -387,7 +385,6 @@ SkBitmap IconUtil::CreateSkBitmapFromHICONHelper(HICON icon,
SkBitmap bitmap;
bitmap.allocN32Pixels(s.width(), s.height());
bitmap.eraseARGB(0, 0, 0, 0);
- SkAutoLockPixels bitmap_lock(bitmap);
// Now we should create a DIB so that we can use ::DrawIconEx in order to
// obtain the icon's image.
@@ -640,7 +637,6 @@ void IconUtil::SetSingleIconImageInformation(const SkBitmap& bitmap,
void IconUtil::CopySkBitmapBitsIntoIconBuffer(const SkBitmap& bitmap,
unsigned char* buffer,
size_t buffer_size) {
- SkAutoLockPixels bitmap_lock(bitmap);
unsigned char* bitmap_ptr = static_cast<unsigned char*>(bitmap.getPixels());
size_t bitmap_size = bitmap.height() * bitmap.width() * 4;
DCHECK_EQ(buffer_size, bitmap_size);
« no previous file with comments | « ui/gfx/color_utils.cc ('k') | ui/gfx/image/image_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698