Index: src/codec/SkScanlineDecoder.cpp |
diff --git a/src/codec/SkScanlineDecoder.cpp b/src/codec/SkScanlineDecoder.cpp |
index e011507f80c316cf445764974bb78aa18104aa47..814a869a1eeae08c0af9025fa04bd9c3b0b4d5b4 100644 |
--- a/src/codec/SkScanlineDecoder.cpp |
+++ b/src/codec/SkScanlineDecoder.cpp |
@@ -106,3 +106,20 @@ SkCodec::Result SkScanlineDecoder::start(const SkImageInfo& dstInfo) { |
return this->start(dstInfo, nullptr, nullptr, nullptr); |
} |
+int SkScanlineDecoder::getY(int srcY) const { |
+ //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
|
+ switch (this->getScanlineOrder()) { |
+ case kTopDown_SkScanlineOrder: |
+ return srcY; |
+ case kBottomUp_SkScanlineOrder: |
+ return this->dstInfo().height() - srcY - 1; |
+ case kOutOfOrder_SkScanlineOrder: |
+ return get_output_row_interlaced(srcY, this->dstInfo().height()); |
+ case kNone_SkScanlineOrder: |
+ // When the scanline order is kNone, it is very inefficient to make |
+ // more than a single call to getScanlines(), so we should never need |
+ // to call getY(). |
+ SkASSERT(false); |
+ return 0; |
+ } |
+} |