SkBitmap and SkPixelRef no longer need lock/unlock

https://codereview.chromium.org/2823003002
This commit is contained in:
Aleksei Kuzmin 2017-08-08 16:38:04 +03:00 committed by Cheng Zhao
parent ea4a36039a
commit ea8e113b19
5 changed files with 0 additions and 12 deletions

View file

@ -48,7 +48,6 @@ gfx::ImageSkia ScaleDesktopFrame(std::unique_ptr<webrtc::DesktopFrame> frame,
SkBitmap result;
result.allocN32Pixels(scaled_rect.width(), scaled_rect.height(), true);
result.lockPixels();
uint8* pixels_data = reinterpret_cast<uint8*>(result.getPixels());
libyuv::ARGBScale(frame->data(), frame->stride(),
@ -69,8 +68,6 @@ gfx::ImageSkia ScaleDesktopFrame(std::unique_ptr<webrtc::DesktopFrame> frame,
}
}
result.unlockPixels();
return gfx::ImageSkia::CreateFrom1xBitmap(result);
}