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

Unified Diff: content/test/image_decoder_test.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: content/test/image_decoder_test.cc
diff --git a/content/test/image_decoder_test.cc b/content/test/image_decoder_test.cc
index 1ff6b7bcd27028ca8044950607f91b9afaf528f3..ff682f4e7387e347a42a358724d0abfe229ceb02 100644
--- a/content/test/image_decoder_test.cc
+++ b/content/test/image_decoder_test.cc
@@ -61,7 +61,6 @@ base::FilePath GetMD5SumPath(const base::FilePath& path) {
void SaveMD5Sum(const base::FilePath& path, const blink::WebImage& web_image) {
// Calculate MD5 sum.
base::MD5Digest digest;
- web_image.getSkBitmap().lockPixels();
base::MD5Sum(web_image.getSkBitmap().getPixels(),
web_image.getSkBitmap().width() *
web_image.getSkBitmap().height() * sizeof(uint32_t),
@@ -71,7 +70,6 @@ void SaveMD5Sum(const base::FilePath& path, const blink::WebImage& web_image) {
int bytes_written = base::WriteFile(
path, reinterpret_cast<const char*>(&digest), sizeof digest);
ASSERT_EQ(sizeof digest, bytes_written);
- web_image.getSkBitmap().unlockPixels();
}
#endif
@@ -89,7 +87,6 @@ void VerifyImage(const blink::WebImageDecoder& decoder,
// Calculate MD5 sum.
base::MD5Digest actual_digest;
blink::WebImage web_image = decoder.GetFrameAtIndex(frame_index);
- web_image.GetSkBitmap().lockPixels();
base::MD5Sum(web_image.GetSkBitmap().getPixels(),
web_image.GetSkBitmap().width() *
web_image.GetSkBitmap().height() * sizeof(uint32_t),
@@ -105,7 +102,6 @@ void VerifyImage(const blink::WebImageDecoder& decoder,
// Verify that the sums are the same.
EXPECT_EQ(0, memcmp(&expected_digest, &actual_digest, sizeof actual_digest))
<< path.value();
- web_image.GetSkBitmap().unlockPixels();
}
#endif
« no previous file with comments | « content/shell/test_runner/test_runner_for_specific_view.cc ('k') | extensions/browser/api/web_contents_capture_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698