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

Unified Diff: Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp

Issue 11876030: Merge 138170 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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 | Source/WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp
===================================================================
--- Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp (revision 139669)
+++ Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp (working copy)
@@ -188,7 +188,7 @@
{
SkAutoLockPixels bitmapLock(bitmap);
- if (bitmap.config() != SkBitmap::kARGB_8888_Config)
+ if (bitmap.config() != SkBitmap::kARGB_8888_Config || !bitmap.getPixels())
return false; // Only support 32 bit/pixel skia bitmaps.
return encodePixels(IntSize(bitmap.width(), bitmap.height()), static_cast<unsigned char *>(bitmap.getPixels()), true, quality, output);
« no previous file with comments | « no previous file | Source/WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698