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

Unified Diff: content/browser/renderer_host/render_widget_host_view_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: content/browser/renderer_host/render_widget_host_view_browsertest.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_browsertest.cc b/content/browser/renderer_host/render_widget_host_view_browsertest.cc
index 25a2ba5a164bbd7c5a4e15f427bd0ba5193295c3..3183991eda1f305defc3e43a33e16bad6e79fdae 100644
--- a/content/browser/renderer_host/render_widget_host_view_browsertest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_browsertest.cc
@@ -469,8 +469,6 @@ class CompositingRenderWidgetHostViewBrowserTestTabCapture
return;
}
- SkAutoLockPixels bitmap_lock(bitmap);
-
// Check that the |bitmap| contains cyan and/or yellow pixels. This is
// needed because the compositor will read back "blank" frames until the
// first frame from the renderer is composited. See comments in
@@ -509,7 +507,6 @@ class CompositingRenderWidgetHostViewBrowserTestTabCapture
EXPECT_EQ(expected_bitmap.width(), bitmap.width());
EXPECT_EQ(expected_bitmap.height(), bitmap.height());
EXPECT_EQ(expected_bitmap.colorType(), bitmap.colorType());
- SkAutoLockPixels expected_bitmap_lock(expected_bitmap);
int fails = 0;
for (int i = 0; i < bitmap.width() && fails < 10; ++i) {
for (int j = 0; j < bitmap.height() && fails < 10; ++j) {
@@ -727,13 +724,10 @@ class CompositingRenderWidgetHostViewBrowserTestTabCapture
// Left half is #0ff.
bitmap->eraseARGB(255, 0, 255, 255);
// Right half is #ff0.
- {
- SkAutoLockPixels lock(*bitmap);
- for (int i = 0; i < copy_size.width() / 2; ++i) {
- for (int j = 0; j < copy_size.height(); ++j) {
- *(bitmap->getAddr32(copy_size.width() / 2 + i, j)) =
- SkColorSetARGB(255, 255, 255, 0);
- }
+ for (int i = 0; i < copy_size.width() / 2; ++i) {
+ for (int j = 0; j < copy_size.height(); ++j) {
+ *(bitmap->getAddr32(copy_size.width() / 2 + i, j)) =
+ SkColorSetARGB(255, 255, 255, 0);
}
}
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | content/common/cursors/webcursor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698