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

Unified Diff: src/codec/SkCodec_libico.h

Issue 1567863003: Rename SkGifCodec, SkIcoCodec, SkWbmpCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/codec/SkCodec_libgif.cpp ('k') | src/codec/SkCodec_libico.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodec_libico.h
diff --git a/src/codec/SkCodec_libico.h b/src/codec/SkCodec_libico.h
deleted file mode 100644
index 9a3f248af5860641bb91e17d5f416ac1b2465644..0000000000000000000000000000000000000000
--- a/src/codec/SkCodec_libico.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "SkCodec.h"
-#include "SkImageInfo.h"
-#include "SkStream.h"
-#include "SkTypes.h"
-
-/*
- * This class implements the decoding for bmp images
- */
-class SkIcoCodec : public SkCodec {
-public:
- static bool IsIco(const void*, size_t);
-
- /*
- * Assumes IsIco was called and returned true
- * Creates an Ico decoder
- * Reads enough of the stream to determine the image format
- */
- static SkCodec* NewFromStream(SkStream*);
-
-protected:
-
- /*
- * Chooses the best dimensions given the desired scale
- */
- SkISize onGetScaledDimensions(float desiredScale) const override;
-
- bool onDimensionsSupported(const SkISize&) override;
-
- /*
- * Initiates the Ico decode
- */
- Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, const Options&,
- SkPMColor*, int*, int*) override;
-
- SkEncodedFormat onGetEncodedFormat() const override {
- return kICO_SkEncodedFormat;
- }
-
- SkScanlineOrder onGetScanlineOrder() const override;
-
-private:
-
- Result onStartScanlineDecode(const SkImageInfo& dstInfo, const SkCodec::Options& options,
- SkPMColor inputColorPtr[], int* inputColorCount) override;
-
- int onGetScanlines(void* dst, int count, size_t rowBytes) override;
-
- bool onSkipScanlines(int count) override;
-
- SkSampler* getSampler(bool createIfNecessary) override;
-
- /*
- * Searches fEmbeddedCodecs for a codec that matches requestedSize.
- * The search starts at startIndex and ends when an appropriate codec
- * is found, or we have reached the end of the array.
- *
- * @return the index of the matching codec or -1 if there is no
- * matching codec between startIndex and the end of
- * the array.
- */
- int chooseCodec(const SkISize& requestedSize, int startIndex);
-
- /*
- * Constructor called by NewFromStream
- * @param embeddedCodecs codecs for the embedded images, takes ownership
- */
- SkIcoCodec(const SkImageInfo& srcInfo, SkTArray<SkAutoTDelete<SkCodec>, true>* embeddedCodecs);
-
- SkAutoTDelete<SkTArray<SkAutoTDelete<SkCodec>, true>> fEmbeddedCodecs; // owned
-
- // Only used by the scanline decoder. onStartScanlineDecode() will set
- // fCurrScanlineCodec to one of the fEmbeddedCodecs, if it can find a
- // codec of the appropriate size. We will use fCurrScanlineCodec for
- // subsequent calls to onGetScanlines() or onSkipScanlines().
- // fCurrScanlineCodec is owned by this class, but should not be an
- // SkAutoTDelete. It will be deleted by the destructor of fEmbeddedCodecs.
- SkCodec* fCurrScanlineCodec;
-
- typedef SkCodec INHERITED;
-};
« no previous file with comments | « src/codec/SkCodec_libgif.cpp ('k') | src/codec/SkCodec_libico.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698