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

Unified Diff: ui/gfx/gtk_util.cc

Issue 9858001: ui/gfx: Make use of SkAutoLockPixels to automatically lock and unlock bitmap pixels properly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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: ui/gfx/gtk_util.cc
diff --git a/ui/gfx/gtk_util.cc b/ui/gfx/gtk_util.cc
index 0b133cb664c4c15c61ee9d372c0fa3215df69cd9..b09975f26435614f3913b0eed3fa98e3d1d434a3 100644
--- a/ui/gfx/gtk_util.cc
+++ b/ui/gfx/gtk_util.cc
@@ -82,7 +82,7 @@ GdkPixbuf* GdkPixbufFromSkBitmap(const SkBitmap* bitmap) {
if (bitmap->isNull())
return NULL;
- bitmap->lockPixels();
+ SkAutoLockPixels lock_pixels(*bitmap);
int width = bitmap->width();
int height = bitmap->height();
@@ -122,7 +122,6 @@ GdkPixbuf* GdkPixbufFromSkBitmap(const SkBitmap* bitmap) {
8,
width, height, stride, &FreePixels, divided);
- bitmap->unlockPixels();
return pixbuf;
}
« 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