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

Unified Diff: chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.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/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.cc
diff --git a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.cc b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.cc
index 0b12461de64ed8085e9adea8887b432cca1d5dd7..fdf9002c585fb5404a655c15d246fb13b83723b6 100644
--- a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.cc
+++ b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.cc
@@ -102,7 +102,6 @@ SkColor ComputeAverageColor(const SkBitmap& bitmap) {
return SkColorSetARGB(0, 0, 0, 0);
}
uint64_t a = 0, r = 0, g = 0, b = 0;
- bitmap.lockPixels();
for (int x = 0; x < bitmap.width(); ++x) {
for (int y = 0; y < bitmap.height(); ++y) {
const SkColor color = bitmap.getColor(x, y);
@@ -112,7 +111,6 @@ SkColor ComputeAverageColor(const SkBitmap& bitmap) {
b += SkColorGetB(color);
}
}
- bitmap.unlockPixels();
uint64_t pixel_number = bitmap.width() * bitmap.height();
return SkColorSetARGB((a + pixel_number / 2) / pixel_number,
(r + pixel_number / 2) / pixel_number,

Powered by Google App Engine
This is Rietveld 408576698