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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp

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: third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp b/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp
index 2a17f3daee1e60ec3e749a3829c01a71d9916d23..d88ea7c99cf42906e6facef8d7c16cc12586b3eb 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp
@@ -83,8 +83,6 @@ static bool BitmapsEqual(sk_sp<const PaintRecord> record1,
SkBitmap bitmap1 = RecordToBitmap(record1);
SkBitmap bitmap2 = RecordToBitmap(record2);
- bitmap1.lockPixels();
- bitmap2.lockPixels();
int mismatch_count = 0;
const int kMaxMismatches = 10;
for (int y = 0; y < rect.height() && mismatch_count < kMaxMismatches; ++y) {
@@ -98,8 +96,6 @@ static bool BitmapsEqual(sk_sp<const PaintRecord> record1,
}
}
}
- bitmap1.unlockPixels();
- bitmap2.unlockPixels();
return !mismatch_count;
}

Powered by Google App Engine
This is Rietveld 408576698