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

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

Issue 1332053002: Fill incomplete images in SkCodec parent class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Response to comments Created 5 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
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 "SkScanlineDecoder.h" 8 #include "SkScanlineDecoder.h"
9 #include "SkBmpCodec.h" 9 #include "SkBmpCodec.h"
10 #include "SkCodec_libgif.h" 10 #include "SkCodec_libgif.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 fCurrScanline = 0; 99 fCurrScanline = 0;
100 fDstInfo = dstInfo; 100 fDstInfo = dstInfo;
101 fOptions = *options; 101 fOptions = *options;
102 return SkCodec::kSuccess; 102 return SkCodec::kSuccess;
103 } 103 }
104 104
105 SkCodec::Result SkScanlineDecoder::start(const SkImageInfo& dstInfo) { 105 SkCodec::Result SkScanlineDecoder::start(const SkImageInfo& dstInfo) {
106 return this->start(dstInfo, nullptr, nullptr, nullptr); 106 return this->start(dstInfo, nullptr, nullptr, nullptr);
107 } 107 }
108 108
109 int SkScanlineDecoder::getY(int srcY) const {
110 //SkASSERT(0 < srcY && srcY < this->dstInfo().height());
scroggo 2015/09/25 15:55:06 Why is this commented out? Should it return some i
msarett 2015/10/01 12:44:52 Hmmm... Looks like I commented this out instead o
111 switch (this->getScanlineOrder()) {
112 case kTopDown_SkScanlineOrder:
113 return srcY;
114 case kBottomUp_SkScanlineOrder:
115 return this->dstInfo().height() - srcY - 1;
116 case kOutOfOrder_SkScanlineOrder:
117 return get_output_row_interlaced(srcY, this->dstInfo().height());
118 case kNone_SkScanlineOrder:
119 // When the scanline order is kNone, it is very inefficient to make
120 // more than a single call to getScanlines(), so we should never nee d
121 // to call getY().
122 SkASSERT(false);
123 return 0;
124 }
125 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698