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

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

Issue 1813273002: Parse icc profiles and exif orientation from jpeg markers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix build error Created 4 years, 9 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 | « resources/icc-v2-gbr.jpg ('k') | src/codec/SkCodecPriv.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 "SkBmpCodec.h" 8 #include "SkBmpCodec.h"
9 #include "SkCodec.h" 9 #include "SkCodec.h"
10 #include "SkCodecPriv.h" 10 #include "SkCodecPriv.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return nullptr; 107 return nullptr;
108 } 108 }
109 109
110 SkCodec* SkCodec::NewFromData(SkData* data, SkPngChunkReader* reader) { 110 SkCodec* SkCodec::NewFromData(SkData* data, SkPngChunkReader* reader) {
111 if (!data) { 111 if (!data) {
112 return nullptr; 112 return nullptr;
113 } 113 }
114 return NewFromStream(new SkMemoryStream(data), reader); 114 return NewFromStream(new SkMemoryStream(data), reader);
115 } 115 }
116 116
117 SkCodec::SkCodec(const SkImageInfo& info, SkStream* stream, sk_sp<SkColorSpace> colorSpace) 117 SkCodec::SkCodec(const SkImageInfo& info, SkStream* stream, sk_sp<SkColorSpace> colorSpace,
118 Origin origin)
118 : fSrcInfo(info) 119 : fSrcInfo(info)
119 , fStream(stream) 120 , fStream(stream)
120 , fNeedsRewind(false) 121 , fNeedsRewind(false)
121 , fColorSpace(colorSpace) 122 , fColorSpace(colorSpace)
123 , fOrigin(origin)
122 , fDstInfo() 124 , fDstInfo()
123 , fOptions() 125 , fOptions()
124 , fCurrScanline(-1) 126 , fCurrScanline(-1)
125 {} 127 {}
126 128
127 SkCodec::~SkCodec() {} 129 SkCodec::~SkCodec() {}
128 130
129 bool SkCodec::rewindIfNeeded() { 131 bool SkCodec::rewindIfNeeded() {
130 if (!fStream) { 132 if (!fStream) {
131 // Some codecs do not have a stream, but they hold others that do. They 133 // Some codecs do not have a stream, but they hold others that do. They
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 SkASSERT(1 == linesRequested || this->getInfo().height() == linesReq uested); 381 SkASSERT(1 == linesRequested || this->getInfo().height() == linesReq uested);
380 const SkImageInfo fillInfo = info.makeWH(fillWidth, 1); 382 const SkImageInfo fillInfo = info.makeWH(fillWidth, 1);
381 for (int srcY = linesDecoded; srcY < linesRequested; srcY++) { 383 for (int srcY = linesDecoded; srcY < linesRequested; srcY++) {
382 fillDst = SkTAddOffset<void>(dst, this->outputScanline(srcY) * r owBytes); 384 fillDst = SkTAddOffset<void>(dst, this->outputScanline(srcY) * r owBytes);
383 fill_proc(fillInfo, fillDst, rowBytes, fillValue, zeroInit, samp ler); 385 fill_proc(fillInfo, fillDst, rowBytes, fillValue, zeroInit, samp ler);
384 } 386 }
385 break; 387 break;
386 } 388 }
387 } 389 }
388 } 390 }
OLDNEW
« no previous file with comments | « resources/icc-v2-gbr.jpg ('k') | src/codec/SkCodecPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698