Lines Matching refs:SkCodec

104 static SkCodec::Result reset_and_decode_image_config(wuffs_gif__decoder*       decoder,
114 return SkCodec::kInternalError;
126 return SkCodec::kErrorInInput;
128 return SkCodec::kIncompleteInput;
145 return SkCodec::kInternalError;
152 return SkCodec::kSuccess;
177 // inherit from both SkCodec and SkFrameHolder, and Skia style discourages
214 // SkCodec overrides.
221 const SkCodec::Options& options) override;
242 const SkCodec::Options& options,
348 // Pass a nullptr SkStream to the SkCodec constructor. We
349 // manage the stream ourselves, as the default SkCodec behavior
400 SkCodec::Result SkWuffsCodec::onGetPixels(const SkImageInfo& dstInfo,
405 SkCodec::Result result = this->onStartIncrementalDecode(dstInfo, dst, rowBytes, options);
416 SkCodec::Result SkWuffsCodec::onStartIncrementalDecode(const SkImageInfo& dstInfo,
419 const SkCodec::Options& options) {
421 return SkCodec::kInvalidParameters;
424 return SkCodec::kUnimplemented;
426 SkCodec::Result result = this->seekFrame(WhichDecoder::kIncrDecode, options.fFrameIndex);
427 if (result != SkCodec::kSuccess) {
433 return SkCodec::kIncompleteInput;
436 return SkCodec::kErrorInInput;
472 if (result != SkCodec::kSuccess) {
479 return SkCodec::kSuccess;
482 SkCodec::Result SkWuffsCodec::onStartIncrementalDecodeOnePass(const SkImageInfo& dstInfo,
485 const SkCodec::Options& options,
501 return SkCodec::kInternalError;
508 (this->frame(options.fFrameIndex)->getRequiredFrame() != SkCodec::kNoFrame)) {
515 return SkCodec::kSuccess;
518 SkCodec::Result SkWuffsCodec::onStartIncrementalDecodeTwoPass() {
529 return SkCodec::kInternalError;
540 return SkCodec::kInternalError;
546 return SkCodec::kInternalError;
570 return SkCodec::kSuccess;
573 SkCodec::Result SkWuffsCodec::onIncrementalDecode(int* rowsDecoded) {
575 return SkCodec::kInternalError;
582 SkCodec::Result result =
584 if (result == SkCodec::kSuccess) {
593 SkCodec::Result SkWuffsCodec::onIncrementalDecodeOnePass() {
597 return SkCodec::kIncompleteInput;
600 return SkCodec::kErrorInInput;
603 return SkCodec::kSuccess;
606 SkCodec::Result SkWuffsCodec::onIncrementalDecodeTwoPass() {
607 SkCodec::Result result = SkCodec::kSuccess;
617 independent = f->getRequiredFrame() == SkCodec::kNoFrame;
622 result = SkCodec::kIncompleteInput;
625 result = SkCodec::kErrorInInput;
637 return SkCodec::kInternalError;
644 return SkCodec::kInternalError;
709 if (result == SkCodec::kSuccess) {
719 // a HTML page, the SkCodec object can live until navigating away from
724 // the lower SkCodec layer), in sequence.
745 // It is valid, in terms of the SkCodec API, to call SkCodec::getFrameCount
750 // though other SkCodec implementations can return increasing values from
755 // Other SkCodec implementations can move the stream forward during
785 if (this->seekFrame(WhichDecoder::kIncrDecode, i) != SkCodec::kSuccess) {
812 bool SkWuffsCodec::onGetFrameInfo(int i, SkCodec::FrameInfo* frameInfo) const {
830 return SkCodec::kRepetitionCountInfinite;
836 SkCodec::Result SkWuffsCodec::seekFrame(WhichDecoder which, int frameIndex) {
838 SkCodec::Result res = this->resetDecoder(which);
839 if (res != SkCodec::kSuccess) {
846 return SkCodec::kInternalError;
852 return SkCodec::kInternalError;
856 return SkCodec::kInternalError;
861 return SkCodec::kInternalError;
863 return SkCodec::kSuccess;
866 SkCodec::Result SkWuffsCodec::resetDecoder(WhichDecoder which) {
868 return SkCodec::kInternalError;
872 SkCodec::Result result =
874 if (result == SkCodec::kIncompleteInput) {
875 return SkCodec::kInternalError;
876 } else if (result != SkCodec::kSuccess) {
881 return SkCodec::kSuccess;
931 std::unique_ptr<SkCodec> SkWuffsCodec_MakeFromStream(std::unique_ptr<SkStream> stream,
932 SkCodec::Result* result) {
960 *result = SkCodec::kInternalError;
966 SkCodec::Result reset_result =
968 if (reset_result != SkCodec::kSuccess) {
976 *result = SkCodec::kInvalidInput;
985 *result = SkCodec::kInternalError;
1004 *result = SkCodec::kSuccess;
1005 return std::unique_ptr<SkCodec>(new SkWuffsCodec(std::move(encodedInfo), std::move(stream),