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

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

Issue 2347473007: Revert of Support Float32 output from SkColorSpaceXform (Closed)
Patch Set: Created 4 years, 3 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/SkCodecPriv.h ('k') | src/codec/SkPngCodec.h » ('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 "SkMSAN.h" 9 #include "SkMSAN.h"
10 #include "SkJpegCodec.h" 10 #include "SkJpegCodec.h"
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 sk_msan_mark_initialized(decodeDst, decodeDst + srcRowBytes, "skbug.com/ 4550"); 510 sk_msan_mark_initialized(decodeDst, decodeDst + srcRowBytes, "skbug.com/ 4550");
511 if (0 == lines) { 511 if (0 == lines) {
512 return y; 512 return y;
513 } 513 }
514 514
515 if (fSwizzler) { 515 if (fSwizzler) {
516 fSwizzler->swizzle(swizzleDst, decodeDst); 516 fSwizzler->swizzle(swizzleDst, decodeDst);
517 } 517 }
518 518
519 if (fColorXform) { 519 if (fColorXform) {
520 fColorXform->apply(dst, swizzleDst, dstWidth, select_xform_format(ds tInfo.colorType()), 520 fColorXform->apply(dst, swizzleDst, dstWidth, dstInfo.colorType(), k Opaque_SkAlphaType);
521 kOpaque_SkAlphaType);
522 dst = SkTAddOffset<void>(dst, rowBytes); 521 dst = SkTAddOffset<void>(dst, rowBytes);
523 } 522 }
524 523
525 decodeDst = SkTAddOffset<JSAMPLE>(decodeDst, decodeDstRowBytes); 524 decodeDst = SkTAddOffset<JSAMPLE>(decodeDst, decodeDstRowBytes);
526 swizzleDst = SkTAddOffset<uint32_t>(swizzleDst, swizzleDstRowBytes); 525 swizzleDst = SkTAddOffset<uint32_t>(swizzleDst, swizzleDstRowBytes);
527 } 526 }
528 527
529 return count; 528 return count;
530 } 529 }
531 530
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 925
927 JDIMENSION linesRead = jpeg_read_raw_data(dinfo, yuv, numRowsPerBlock); 926 JDIMENSION linesRead = jpeg_read_raw_data(dinfo, yuv, numRowsPerBlock);
928 if (linesRead < remainingRows) { 927 if (linesRead < remainingRows) {
929 // FIXME: Handle incomplete YUV decodes without signalling an error. 928 // FIXME: Handle incomplete YUV decodes without signalling an error.
930 return kInvalidInput; 929 return kInvalidInput;
931 } 930 }
932 } 931 }
933 932
934 return kSuccess; 933 return kSuccess;
935 } 934 }
OLDNEW
« no previous file with comments | « src/codec/SkCodecPriv.h ('k') | src/codec/SkPngCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698