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

Unified Diff: src/images/SkImageDecoder_libjpeg.cpp

Issue 19726012: all in the gyp (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: forgot this Created 7 years, 5 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 | « gyp/common_conditions.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libjpeg.cpp
diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp
index 0a016e5cd2daae89222ae53f8e6754df579dc7b3..e0783c9fb5985cd19ff82c0d6494a66c972461c2 100644
--- a/src/images/SkImageDecoder_libjpeg.cpp
+++ b/src/images/SkImageDecoder_libjpeg.cpp
@@ -917,11 +917,6 @@ protected:
SkAutoTime atm("JPEG Encode");
#endif
- const WriteScanline writer = ChooseWriter(bm);
- if (NULL == writer) {
- return false;
- }
-
SkAutoLockPixels alp(bm);
if (NULL == bm.getPixels()) {
return false;
@@ -940,8 +935,14 @@ protected:
if (setjmp(sk_err.fJmpBuf)) {
return false;
}
- jpeg_create_compress(&cinfo);
+ // Keep after setjmp or mark volatile.
+ const WriteScanline writer = ChooseWriter(bm);
+ if (NULL == writer) {
+ return false;
+ }
+
+ jpeg_create_compress(&cinfo);
cinfo.dest = &sk_wstream;
cinfo.image_width = bm.width();
cinfo.image_height = bm.height();
« no previous file with comments | « gyp/common_conditions.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698