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

Unified Diff: chrome/browser/ui/views/toolbar/app_menu.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
Index: chrome/browser/ui/views/toolbar/app_menu.cc
diff --git a/chrome/browser/ui/views/toolbar/app_menu.cc b/chrome/browser/ui/views/toolbar/app_menu.cc
index 9b6ffe2619382ea51aea3a989018b6cf16f72927..f927b84d3a2d34feb502badc19f04875f7e0d817 100644
--- a/chrome/browser/ui/views/toolbar/app_menu.cc
+++ b/chrome/browser/ui/views/toolbar/app_menu.cc
@@ -387,7 +387,6 @@ class HoveredImageSource : public gfx::ImageSkiaSource {
SkBitmap white;
white.allocN32Pixels(bitmap.width(), bitmap.height());
white.eraseARGB(0, 0, 0, 0);
- bitmap.lockPixels();
for (int y = 0; y < bitmap.height(); ++y) {
uint32_t* image_row = bitmap.getAddr32(0, y);
uint32_t* dst_row = white.getAddr32(0, y);
@@ -397,7 +396,6 @@ class HoveredImageSource : public gfx::ImageSkiaSource {
dst_row[x] = (image_pixel & 0xFF000000) == 0x0 ? 0x0 : color_;
}
}
- bitmap.unlockPixels();
return gfx::ImageSkiaRep(white, scale);
}
« no previous file with comments | « chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc ('k') | chrome/browser/web_applications/web_app_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698