diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-11 18:37:00 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-11 18:37:00 +0000 |
commit | 5d29a5ce7ec414c2e1fcc29e44aa1fd0f0766b9c (patch) | |
tree | 65db1f3cab163522a9ee6c399956ab4abc182fe7 /ui | |
parent | a1276c0122fffbf9111ab59e772ba5a1d8e32fbe (diff) | |
download | chromium_src-5d29a5ce7ec414c2e1fcc29e44aa1fd0f0766b9c.zip chromium_src-5d29a5ce7ec414c2e1fcc29e44aa1fd0f0766b9c.tar.gz chromium_src-5d29a5ce7ec414c2e1fcc29e44aa1fd0f0766b9c.tar.bz2 |
Make sure to lockPixels() before reading one in ImageTest.CheckSkiaColor.
BUG=none
TEST=Clang gfx_unittest passes
Review URL: http://codereview.chromium.org/6502001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74636 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gfx/image_unittest.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/gfx/image_unittest.cc b/ui/gfx/image_unittest.cc index 40e8bc80..10dea88 100644 --- a/ui/gfx/image_unittest.cc +++ b/ui/gfx/image_unittest.cc @@ -98,6 +98,8 @@ TEST_F(ImageTest, PlatformToPlatform) { TEST_F(ImageTest, CheckSkiaColor) { ui::gfx::Image image(CreatePlatformImage()); const SkBitmap& bitmap(image); + + SkAutoLockPixels auto_lock(bitmap); uint32_t* pixel = bitmap.getAddr32(10, 10); EXPECT_EQ(SK_ColorRED, *pixel); } |