Commit 05ec1066 authored by bsalomon@google.com's avatar bsalomon@google.com

Lock SkBitmap's pixels before calling SkBitmap::getAddr32.

Review URL: https://chromiumcodereview.appspot.com/10821045

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148612 0039d316-1c4b-4281-b951-d872f2087c98
parent 298d39bd
...@@ -563,6 +563,8 @@ bool BackingStoreGtk::CopyFromBackingStore(const gfx::Rect& rect, ...@@ -563,6 +563,8 @@ bool BackingStoreGtk::CopyFromBackingStore(const gfx::Rect& rect,
// using. This code assumes a visual mode where a pixel is // using. This code assumes a visual mode where a pixel is
// represented using a 32-bit unsigned int, with a byte per component. // represented using a 32-bit unsigned int, with a byte per component.
SkBitmap bitmap = skia::GetTopDevice(*output)->accessBitmap(true); SkBitmap bitmap = skia::GetTopDevice(*output)->accessBitmap(true);
SkAutoLockPixels alp(bitmap);
for (int y = 0; y < height; y++) { for (int y = 0; y < height; y++) {
const uint32* src_row = reinterpret_cast<uint32*>( const uint32* src_row = reinterpret_cast<uint32*>(
&image->data[image->bytes_per_line * y]); &image->data[image->bytes_per_line * y]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment