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

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

Issue 2044573002: Revert of Make SkPngCodec decode progressively. (Closed) Base URL: https://skia.googlesource.com/skia.git@foil
Patch Set: Rebase Created 4 years, 6 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/codec/SkCodec.cpp ('k') | src/codec/SkIcoCodec.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 "SkCodecPriv.h" 8 #include "SkCodecPriv.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkColorTable.h" 10 #include "SkColorTable.h"
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 513
514 // FIXME: This is similar to the implementation for bmp and png. Can we share m ore code or 514 // FIXME: This is similar to the implementation for bmp and png. Can we share m ore code or
515 // possibly make this non-virtual? 515 // possibly make this non-virtual?
516 uint32_t SkGifCodec::onGetFillValue(SkColorType colorType) const { 516 uint32_t SkGifCodec::onGetFillValue(SkColorType colorType) const {
517 const SkPMColor* colorPtr = get_color_ptr(fColorTable.get()); 517 const SkPMColor* colorPtr = get_color_ptr(fColorTable.get());
518 return get_color_table_fill_value(colorType, colorPtr, fFillIndex); 518 return get_color_table_fill_value(colorType, colorPtr, fFillIndex);
519 } 519 }
520 520
521 SkCodec::Result SkGifCodec::onStartScanlineDecode(const SkImageInfo& dstInfo, 521 SkCodec::Result SkGifCodec::onStartScanlineDecode(const SkImageInfo& dstInfo,
522 const SkCodec::Options& opts, SkPMColor inputColorPtr[], int* inputColor Count) { 522 const SkCodec::Options& opts, SkPMColor inputColorPtr[], int* inputColor Count) {
523 return this->prepareToDecode(dstInfo, inputColorPtr, inputColorCount, opts); 523 return this->prepareToDecode(dstInfo, inputColorPtr, inputColorCount, this-> options());
524 } 524 }
525 525
526 void SkGifCodec::handleScanlineFrame(int count, int* rowsBeforeFrame, int* rowsI nFrame) { 526 void SkGifCodec::handleScanlineFrame(int count, int* rowsBeforeFrame, int* rowsI nFrame) {
527 if (fFrameIsSubset) { 527 if (fFrameIsSubset) {
528 const int currRow = this->currScanline(); 528 const int currRow = this->currScanline();
529 529
530 // The number of rows that remain to be skipped before reaching rows tha t we 530 // The number of rows that remain to be skipped before reaching rows tha t we
531 // actually must decode into. 531 // actually must decode into.
532 // This must be at least zero. We also make sure that it is less than o r 532 // This must be at least zero. We also make sure that it is less than o r
533 // equal to count, since we will skip at most count rows. 533 // equal to count, since we will skip at most count rows.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 int SkGifCodec::onOutputScanline(int inputScanline) const { 598 int SkGifCodec::onOutputScanline(int inputScanline) const {
599 if (fGif->Image.Interlace) { 599 if (fGif->Image.Interlace) {
600 if (inputScanline < fFrameRect.top() || inputScanline >= fFrameRect.bott om()) { 600 if (inputScanline < fFrameRect.top() || inputScanline >= fFrameRect.bott om()) {
601 return inputScanline; 601 return inputScanline;
602 } 602 }
603 return get_output_row_interlaced(inputScanline - fFrameRect.top(), fFram eRect.height()) + 603 return get_output_row_interlaced(inputScanline - fFrameRect.top(), fFram eRect.height()) +
604 fFrameRect.top(); 604 fFrameRect.top();
605 } 605 }
606 return inputScanline; 606 return inputScanline;
607 } 607 }
OLDNEW
« no previous file with comments | « src/codec/SkCodec.cpp ('k') | src/codec/SkIcoCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698