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

Side by Side Diff: include/codec/SkCodec.h

Issue 1472933002: Make SkAndroidCodec support ico (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 #ifndef SkCodec_DEFINED 8 #ifndef SkCodec_DEFINED
9 #define SkCodec_DEFINED 9 #define SkCodec_DEFINED
10 10
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 * Update the next scanline. Used by interlaced png. 514 * Update the next scanline. Used by interlaced png.
515 */ 515 */
516 void updateNextScanline(int newY) { fCurrScanline = newY; } 516 void updateNextScanline(int newY) { fCurrScanline = newY; }
517 517
518 const SkImageInfo& dstInfo() const { return fDstInfo; } 518 const SkImageInfo& dstInfo() const { return fDstInfo; }
519 519
520 const SkCodec::Options& options() const { return fOptions; } 520 const SkCodec::Options& options() const { return fOptions; }
521 521
522 virtual int onOutputScanline(int inputScanline) const; 522 virtual int onOutputScanline(int inputScanline) const;
523 523
524 int currScanline() const { return fCurrScanline; }
525
524 private: 526 private:
525 const SkImageInfo fSrcInfo; 527 const SkImageInfo fSrcInfo;
526 SkAutoTDelete<SkStream> fStream; 528 SkAutoTDelete<SkStream> fStream;
527 bool fNeedsRewind; 529 bool fNeedsRewind;
528 // These fields are only meaningful during scanline decodes. 530 // These fields are only meaningful during scanline decodes.
529 SkImageInfo fDstInfo; 531 SkImageInfo fDstInfo;
530 SkCodec::Options fOptions; 532 SkCodec::Options fOptions;
531 int fCurrScanline; 533 int fCurrScanline;
532 534
533 /** 535 /**
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 * Return an object which will allow forcing scanline decodes to sample in X. 587 * Return an object which will allow forcing scanline decodes to sample in X.
586 * 588 *
587 * May create a sampler, if one is not currently being used. Otherwise, doe s 589 * May create a sampler, if one is not currently being used. Otherwise, doe s
588 * not affect ownership. 590 * not affect ownership.
589 * 591 *
590 * Only valid during scanline decoding. 592 * Only valid during scanline decoding.
591 */ 593 */
592 virtual SkSampler* getSampler(bool /*createIfNecessary*/) { return nullptr; } 594 virtual SkSampler* getSampler(bool /*createIfNecessary*/) { return nullptr; }
593 595
594 friend class SkSampledCodec; 596 friend class SkSampledCodec;
597 friend class SkIcoCodec;
msarett 2015/11/24 22:43:35 SkIcoCodec has to call fCodec->getSampler().
595 }; 598 };
596 #endif // SkCodec_DEFINED 599 #endif // SkCodec_DEFINED
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | src/codec/SkAndroidCodec.cpp » ('j') | src/codec/SkBmpStandardCodec.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698