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

Side by Side Diff: src/codec/SkJpegCodec.cpp

Issue 1406223002: Create an SkAndroidCodec API separate from SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Win bot fix Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « src/codec/SkCodec_libpng.cpp ('k') | src/codec/SkMaskSwizzler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkCodec.h" 8 #include "SkCodec.h"
9 #include "SkJpegCodec.h" 9 #include "SkJpegCodec.h"
10 #include "SkJpegDecoderMgr.h" 10 #include "SkJpegDecoderMgr.h"
11 #include "SkJpegUtility_codec.h" 11 #include "SkJpegUtility_codec.h"
12 #include "SkCodecPriv.h" 12 #include "SkCodecPriv.h"
13 #include "SkColorPriv.h" 13 #include "SkColorPriv.h"
14 #include "SkScaledCodec.h"
15 #include "SkStream.h" 14 #include "SkStream.h"
16 #include "SkTemplates.h" 15 #include "SkTemplates.h"
17 #include "SkTypes.h" 16 #include "SkTypes.h"
18 17
19 // stdio is needed for libjpeg-turbo 18 // stdio is needed for libjpeg-turbo
20 #include <stdio.h> 19 #include <stdio.h>
21 20
22 extern "C" { 21 extern "C" {
23 #include "jerror.h" 22 #include "jerror.h"
24 #include "jpeglib.h" 23 #include "jpeglib.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 #endif 516 #endif
518 517
519 bool SkJpegCodec::onSkipScanlines(int count) { 518 bool SkJpegCodec::onSkipScanlines(int count) {
520 // Set the jump location for libjpeg errors 519 // Set the jump location for libjpeg errors
521 if (setjmp(fDecoderMgr->getJmpBuf())) { 520 if (setjmp(fDecoderMgr->getJmpBuf())) {
522 return fDecoderMgr->returnFalse("setjmp"); 521 return fDecoderMgr->returnFalse("setjmp");
523 } 522 }
524 523
525 return (uint32_t) count == jpeg_skip_scanlines(fDecoderMgr->dinfo(), count); 524 return (uint32_t) count == jpeg_skip_scanlines(fDecoderMgr->dinfo(), count);
526 } 525 }
OLDNEW
« no previous file with comments | « src/codec/SkCodec_libpng.cpp ('k') | src/codec/SkMaskSwizzler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698