summaryrefslogtreecommitdiffstats
path: root/skia/ext/image_operations.cc
diff options
context:
space:
mode:
authorhubbe@chromium.org <hubbe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-15 16:01:39 +0000
committerhubbe@chromium.org <hubbe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-15 16:01:39 +0000
commita63306e826880313ae22383a9bd3b6995fb5f743 (patch)
tree6cc9bc9862fcedd33110a2ac4a4970b412e66bc2 /skia/ext/image_operations.cc
parentc93916b640465d75cb41b9fc32600ec8279b9756 (diff)
downloadchromium_src-a63306e826880313ae22383a9bd3b6995fb5f743.zip
chromium_src-a63306e826880313ae22383a9bd3b6995fb5f743.tar.gz
chromium_src-a63306e826880313ae22383a9bd3b6995fb5f743.tar.bz2
Make sure skia doesn't try to scale images with less than 32 bits per pixel.
The previous attempt to commit this was reverted because ui_unittests stopped working on windows. Since I don't have a windows box, I can't fix the test, so in this CL I am disabling the tests and notifying the people who can fix it. This log shows what happened when the test was not disabled: http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%28dbg%29%281%29/builds/36957/steps/ui_unittests/logs/stdio BUG=247081 Review URL: https://chromiumcodereview.appspot.com/17100002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206599 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/image_operations.cc')
-rw-r--r--skia/ext/image_operations.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/skia/ext/image_operations.cc b/skia/ext/image_operations.cc
index b1cdade..f30a85d 100644
--- a/skia/ext/image_operations.cc
+++ b/skia/ext/image_operations.cc
@@ -496,8 +496,8 @@ SkBitmap ImageOperations::ResizeBasic(const SkBitmap& source,
(method <= ImageOperations::RESIZE_LAST_ALGORITHM_METHOD));
SkAutoLockPixels locker(source);
- if (!source.readyToDraw())
- return SkBitmap();
+ if (!source.readyToDraw() || source.config() != SkBitmap::kARGB_8888_Config)
+ return SkBitmap();
ResizeFilter filter(method, source.width(), source.height(),
dest_width, dest_height, dest_subset);