Index: ui/gfx/canvas.cc |
diff --git a/ui/gfx/canvas.cc b/ui/gfx/canvas.cc |
index 47347f3cea0227718765c252ebfa1e5aa0d0ca3d..60128fe01c86d99dbcd5d200fd7c3a2700690cd8 100644 |
--- a/ui/gfx/canvas.cc |
+++ b/ui/gfx/canvas.cc |
@@ -525,15 +525,7 @@ void Canvas::Transform(const gfx::Transform& transform) { |
SkBitmap Canvas::GetBitmap() const { |
DCHECK(bitmap_); |
- SkBitmap bitmap = bitmap_.value(); |
- // When the bitmap is copied, it shares the underlying pixelref, but doesn't |
- // initialize pixels unless they are locked. Hence, ensure that the returned |
- // bitmap keeps the pixelref alive by locking it. Note that the dtor of |
- // SkBitmap will unlock the pixelrefs, so this won't leak. Also note that |
- // moving SkBitmap retains the same lock as the source, so the caller |
- // will receive a locked-pixels bitmap. |
- bitmap.lockPixels(); |
- return bitmap; |
+ return bitmap_.value(); |
} |
bool Canvas::IntersectsClipRect(const SkRect& rect) { |