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

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

Issue 1123473004: remove dead code behind BOOL_ONGETINFO (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 | « include/core/SkImageGenerator.h ('k') | src/core/SkImageGenerator.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 "SkData.h" 9 #include "SkData.h"
10 #include "SkCodec_libbmp.h" 10 #include "SkCodec_libbmp.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 SkCodec* SkCodec::NewFromData(SkData* data) { 65 SkCodec* SkCodec::NewFromData(SkData* data) {
66 if (!data) { 66 if (!data) {
67 return NULL; 67 return NULL;
68 } 68 }
69 return NewFromStream(SkNEW_ARGS(SkMemoryStream, (data))); 69 return NewFromStream(SkNEW_ARGS(SkMemoryStream, (data)));
70 } 70 }
71 71
72 SkCodec::SkCodec(const SkImageInfo& info, SkStream* stream) 72 SkCodec::SkCodec(const SkImageInfo& info, SkStream* stream)
73 : INHERITED(info) 73 : INHERITED(info)
74 #ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
75 , fInfo(info)
76 #endif
77 , fStream(stream) 74 , fStream(stream)
78 , fNeedsRewind(false) 75 , fNeedsRewind(false)
79 {} 76 {}
80 77
81 SkCodec::RewindState SkCodec::rewindIfNeeded() { 78 SkCodec::RewindState SkCodec::rewindIfNeeded() {
82 // Store the value of fNeedsRewind so we can update it. Next read will 79 // Store the value of fNeedsRewind so we can update it. Next read will
83 // require a rewind. 80 // require a rewind.
84 const bool needsRewind = fNeedsRewind; 81 const bool needsRewind = fNeedsRewind;
85 fNeedsRewind = true; 82 fNeedsRewind = true;
86 if (!needsRewind) { 83 if (!needsRewind) {
(...skipping 16 matching lines...) Expand all
103 return fScanlineDecoder.get(); 100 return fScanlineDecoder.get();
104 } 101 }
105 102
106 SkScanlineDecoder* SkCodec::getScanlineDecoder(const SkImageInfo& dstInfo) { 103 SkScanlineDecoder* SkCodec::getScanlineDecoder(const SkImageInfo& dstInfo) {
107 SkASSERT(kIndex_8_SkColorType != dstInfo.colorType()); 104 SkASSERT(kIndex_8_SkColorType != dstInfo.colorType());
108 if (kIndex_8_SkColorType == dstInfo.colorType()) { 105 if (kIndex_8_SkColorType == dstInfo.colorType()) {
109 return NULL; 106 return NULL;
110 } 107 }
111 return this->getScanlineDecoder(dstInfo, NULL, NULL, NULL); 108 return this->getScanlineDecoder(dstInfo, NULL, NULL, NULL);
112 } 109 }
OLDNEW
« no previous file with comments | « include/core/SkImageGenerator.h ('k') | src/core/SkImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698