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

Unified Diff: content/browser/renderer_host/backing_store_gtk.cc

Issue 10821045: Lock SkBitmap's pixels before calling SkBitmap::getAddr32. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/backing_store_gtk.cc
===================================================================
--- content/browser/renderer_host/backing_store_gtk.cc (revision 148546)
+++ content/browser/renderer_host/backing_store_gtk.cc (working copy)
@@ -563,6 +563,8 @@
// using. This code assumes a visual mode where a pixel is
// represented using a 32-bit unsigned int, with a byte per component.
SkBitmap bitmap = skia::GetTopDevice(*output)->accessBitmap(true);
+ SkAutoLockPixels alp(bitmap);
+
for (int y = 0; y < height; y++) {
const uint32* src_row = reinterpret_cast<uint32*>(
&image->data[image->bytes_per_line * y]);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698