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

Side by Side Diff: src/images/SkImageDecoder_libjpeg.cpp

Issue 1665823002: Hack together MSAN build. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: abstract away Created 4 years, 10 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/core/SkMSAN.h ('k') | tools/xsan_build » ('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 2007 The Android Open Source Project 2 * Copyright 2007 The Android Open Source Project
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 8
9 #include "SkImageDecoder.h" 9 #include "SkImageDecoder.h"
10 #include "SkImageEncoder.h" 10 #include "SkImageEncoder.h"
11 #include "SkJpegUtility.h" 11 #include "SkJpegUtility.h"
12 #include "SkColorPriv.h" 12 #include "SkColorPriv.h"
13 #include "SkDither.h" 13 #include "SkDither.h"
14 #include "SkMSAN.h"
14 #include "SkScaledBitmapSampler.h" 15 #include "SkScaledBitmapSampler.h"
15 #include "SkStream.h" 16 #include "SkStream.h"
16 #include "SkTemplates.h" 17 #include "SkTemplates.h"
17 #include "SkTime.h" 18 #include "SkTime.h"
18 #include "SkUtils.h" 19 #include "SkUtils.h"
19 #include "SkRTConf.h" 20 #include "SkRTConf.h"
20 #include "SkRect.h" 21 #include "SkRect.h"
21 #include "SkCanvas.h" 22 #include "SkCanvas.h"
22 23
23 24
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 return kPartialSuccess; 518 return kPartialSuccess;
518 } 519 }
519 if (this->shouldCancelDecode()) { 520 if (this->shouldCancelDecode()) {
520 return return_failure(cinfo, *bm, "shouldCancelDecode"); 521 return return_failure(cinfo, *bm, "shouldCancelDecode");
521 } 522 }
522 523
523 if (JCS_CMYK == cinfo.out_color_space) { 524 if (JCS_CMYK == cinfo.out_color_space) {
524 convert_CMYK_to_RGB(srcRow, cinfo.output_width); 525 convert_CMYK_to_RGB(srcRow, cinfo.output_width);
525 } 526 }
526 527
528 sk_msan_mark_initialized(srcRow, srcRow + cinfo.output_width * srcBytesP erPixel,
529 "skbug.com/4550");
530
527 sampler.next(srcRow); 531 sampler.next(srcRow);
528 if (bm->height() - 1 == y) { 532 if (bm->height() - 1 == y) {
529 // we're done 533 // we're done
530 break; 534 break;
531 } 535 }
532 536
533 if (!skip_src_rows(&cinfo, srcRow, sampler.srcDY() - 1)) { 537 if (!skip_src_rows(&cinfo, srcRow, sampler.srcDY() - 1)) {
534 return return_failure(cinfo, *bm, "skip rows"); 538 return return_failure(cinfo, *bm, "skip rows");
535 } 539 }
536 } 540 }
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 return SkImageDecoder::kUnknown_Format; 1028 return SkImageDecoder::kUnknown_Format;
1025 } 1029 }
1026 1030
1027 static SkImageEncoder* sk_libjpeg_efactory(SkImageEncoder::Type t) { 1031 static SkImageEncoder* sk_libjpeg_efactory(SkImageEncoder::Type t) {
1028 return (SkImageEncoder::kJPEG_Type == t) ? new SkJPEGImageEncoder : nullptr; 1032 return (SkImageEncoder::kJPEG_Type == t) ? new SkJPEGImageEncoder : nullptr;
1029 } 1033 }
1030 1034
1031 static SkImageDecoder_DecodeReg gDReg(sk_libjpeg_dfactory); 1035 static SkImageDecoder_DecodeReg gDReg(sk_libjpeg_dfactory);
1032 static SkImageDecoder_FormatReg gFormatReg(get_format_jpeg); 1036 static SkImageDecoder_FormatReg gFormatReg(get_format_jpeg);
1033 static SkImageEncoder_EncodeReg gEReg(sk_libjpeg_efactory); 1037 static SkImageEncoder_EncodeReg gEReg(sk_libjpeg_efactory);
OLDNEW
« no previous file with comments | « src/core/SkMSAN.h ('k') | tools/xsan_build » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698