summaryrefslogtreecommitdiffstats
path: root/ui/gfx
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 20:06:36 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 20:06:36 +0000
commit579dacb8e22d9e39e483716c12354aa1ff56b5e6 (patch)
tree5c138f77b6d6662eac256b560d940890a45b580a /ui/gfx
parent1bcea6d823e406bd37694c1f70e04cc72c2bbd28 (diff)
downloadchromium_src-579dacb8e22d9e39e483716c12354aa1ff56b5e6.zip
chromium_src-579dacb8e22d9e39e483716c12354aa1ff56b5e6.tar.gz
chromium_src-579dacb8e22d9e39e483716c12354aa1ff56b5e6.tar.bz2
Clean up CreateTransposedBtmap.
The function started to show up in valgrind reports. It's unlikely this change will improve this. BUG=103391 TEST=none TBR=sky Review URL: http://codereview.chromium.org/8501013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109081 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx')
-rw-r--r--ui/gfx/skbitmap_operations.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/gfx/skbitmap_operations.cc b/ui/gfx/skbitmap_operations.cc
index 3b2c86e..760bd60 100644
--- a/ui/gfx/skbitmap_operations.cc
+++ b/ui/gfx/skbitmap_operations.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -718,13 +718,13 @@ SkBitmap SkBitmapOperations::UnPreMultiply(const SkBitmap& bitmap) {
SkBitmap SkBitmapOperations::CreateTransposedBtmap(const SkBitmap& image) {
DCHECK(image.config() == SkBitmap::kARGB_8888_Config);
- SkAutoLockPixels lock_image(image);
-
SkBitmap transposed;
transposed.setConfig(
SkBitmap::kARGB_8888_Config, image.height(), image.width(), 0);
transposed.allocPixels();
- transposed.eraseARGB(0, 0, 0, 0);
+
+ SkAutoLockPixels lock_image(image);
+ SkAutoLockPixels lock_transposed(transposed);
for (int y = 0; y < image.height(); ++y) {
uint32* image_row = image.getAddr32(0, y);