Index: cc/trees/layer_tree_host_impl.cc |
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
index 9d04554dcc57cf6d22f6eb4c4bfcac65ad194d65..1a94134c390a5c3e4554557032ff5eadb1d545aa 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -3888,9 +3888,7 @@ void LayerTreeHostImpl::CreateUIResource(UIResourceId uid, |
gfx::ColorSpace::CreateSRGB()); |
if (!scaled) { |
- AutoLockUIResourceBitmap bitmap_lock(bitmap); |
- auto* pixels = bitmap_lock.GetPixels(); |
- resource_provider_->CopyToResource(id, pixels, source_size); |
+ resource_provider_->CopyToResource(id, bitmap.GetPixels(), source_size); |
} else { |
// Only support auto-resizing for N32 textures (since this is primarily for |
// scrollbars). Users of other types need to ensure they are not too big. |
@@ -3907,10 +3905,9 @@ void LayerTreeHostImpl::CreateUIResource(UIResourceId uid, |
source_size.width(), source_size.height(), kPremul_SkAlphaType); |
int row_bytes = source_size.width() * 4; |
- AutoLockUIResourceBitmap bitmap_lock(bitmap); |
SkBitmap source_bitmap; |
source_bitmap.setInfo(info, row_bytes); |
- source_bitmap.setPixels(const_cast<uint8_t*>(bitmap_lock.GetPixels())); |
+ source_bitmap.setPixels(const_cast<uint8_t*>(bitmap.GetPixels())); |
// This applies the scale to draw the |bitmap| into |scaled_bitmap|. |
SkBitmap scaled_bitmap; |
@@ -3924,7 +3921,6 @@ void LayerTreeHostImpl::CreateUIResource(UIResourceId uid, |
scaled_canvas.clear(SK_ColorTRANSPARENT); |
scaled_canvas.drawBitmap(source_bitmap, 0, 0); |
- SkAutoLockPixels scaled_bitmap_lock(scaled_bitmap); |
auto* pixels = static_cast<uint8_t*>(scaled_bitmap.getPixels()); |
resource_provider_->CopyToResource(id, pixels, upload_size); |
} |