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

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

Issue 2212563003: Modify SkPngCodec to recognize 565 images from the sBIT chunk (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Allow SkPngCodec to set SkImageInfo directly Created 4 years, 4 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 | « no previous file | src/codec/SkCodec.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 #ifndef SkCodec_DEFINED 8 #ifndef SkCodec_DEFINED
9 #define SkCodec_DEFINED 9 #define SkCodec_DEFINED
10 10
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 /** 519 /**
520 * Takes ownership of SkStream* 520 * Takes ownership of SkStream*
521 */ 521 */
522 SkCodec(int width, 522 SkCodec(int width,
523 int height, 523 int height,
524 const SkEncodedInfo&, 524 const SkEncodedInfo&,
525 SkStream*, 525 SkStream*,
526 sk_sp<SkColorSpace> = nullptr, 526 sk_sp<SkColorSpace> = nullptr,
527 Origin = kTopLeft_Origin); 527 Origin = kTopLeft_Origin);
528 528
529 /**
530 * Takes ownership of SkStream*
531 * Allows the subclass to set the recommended SkImageInfo
532 */
533 SkCodec(const SkEncodedInfo&,
534 const SkImageInfo&,
535 SkStream*,
536 Origin = kTopLeft_Origin);
537
529 virtual SkISize onGetScaledDimensions(float /*desiredScale*/) const { 538 virtual SkISize onGetScaledDimensions(float /*desiredScale*/) const {
530 // By default, scaling is not supported. 539 // By default, scaling is not supported.
531 return this->getInfo().dimensions(); 540 return this->getInfo().dimensions();
532 } 541 }
533 542
534 // FIXME: What to do about subsets?? 543 // FIXME: What to do about subsets??
535 /** 544 /**
536 * Subclasses should override if they support dimensions other than the 545 * Subclasses should override if they support dimensions other than the
537 * srcInfo's. 546 * srcInfo's.
538 */ 547 */
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 729
721 // For testing with qcms 730 // For testing with qcms
722 // FIXME: Remove these when we are done comparing with qcms. 731 // FIXME: Remove these when we are done comparing with qcms.
723 friend class DM::ColorCodecSrc; 732 friend class DM::ColorCodecSrc;
724 friend class ColorCodecBench; 733 friend class ColorCodecBench;
725 734
726 friend class SkSampledCodec; 735 friend class SkSampledCodec;
727 friend class SkIcoCodec; 736 friend class SkIcoCodec;
728 }; 737 };
729 #endif // SkCodec_DEFINED 738 #endif // SkCodec_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/codec/SkCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698