diff options
author | scroggo <scroggo@google.com> | 2015-11-23 07:56:38 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-23 07:56:39 -0800 |
commit | 93c69fff535075e86596a2b224f52f454b060be3 (patch) | |
tree | a3e6990397278996df1d9c80d02a7a015e068a21 /include/core/SkPngChunkReader.h | |
parent | 4b9596109a32ec61ef9ffbbf03684e9f99c3cbf7 (diff) |
Revert of Add SkPngChunkReader. (patchset #9 id:160001 of https://codereview.chromium.org/1040453002/ )
Reason for revert:
Busted Chromium builds:
../../third_party/skia/src/ports/SkImageDecoder_empty.cpp:63:17: error: no type
named 'Peeker' in 'SkImageDecoder'
SkImageDecoder::Peeker* SkImageDecoder::setPeeker(Peeker*) {
~~~~~~~~~~~~~~~~^
../../third_party/skia/src/ports/SkImageDecoder_empty.cpp:63:51: error: unknown
type name 'Peeker'
SkImageDecoder::Peeker* SkImageDecoder::setPeeker(Peeker*) {
Original issue's description:
> Add SkPngChunkReader.
>
> This class allows a client of SkCodec to read chunks in the data
> stream that are not recognized by libpng. This is used by Android
> to specify ninepatch data.
>
> Taken from SkImageDecoder::Peeker. Modify the name of the class
> and its method to be more specific to their use. Make
> SkImageDecoder::Peeker a subclass of the new class, to help stage
> the change in Android.
>
> Add a test to verify that it works.
>
> BUG=skia:4574
> BUG=skia:3257
>
> Committed: https://skia.googlesource.com/skia/+/3389e00136188800b98ca69488c0418c374fd78b
TBR=djsollen@google.com,reed@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4574
Review URL: https://codereview.chromium.org/1472863003
Diffstat (limited to 'include/core/SkPngChunkReader.h')
-rw-r--r-- | include/core/SkPngChunkReader.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/include/core/SkPngChunkReader.h b/include/core/SkPngChunkReader.h deleted file mode 100644 index f424dd8cfc..0000000000 --- a/include/core/SkPngChunkReader.h +++ /dev/null @@ -1,45 +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. - */ - -#ifndef SkPngChunkReader_DEFINED -#define SkPngChunkReader_DEFINED - -#include "SkTypes.h" -#include "SkRefCnt.h" - -/** - * SkPngChunkReader - * - * Base class for optional callbacks to retrieve meta/chunk data out of a PNG - * encoded image as it is being decoded. - * Used by SkImageDecoder and SkCodec. - */ -class SkPngChunkReader : public SkRefCnt { -public: - /** - * This will be called by the decoder when it sees an unknown chunk. - * - * Use by SkCodec: - * Depending on the location of the unknown chunks, this callback may be - * called by - * - the factory (NewFromStream/NewFromData) - * - getPixels - * - startScanlineDecode - * - the first call to getScanlines/skipScanlines - * The callback may be called from a different thread (e.g. if the SkCodec - * is passed to another thread), and it may be called multiple times, if - * the SkCodec is used multiple times. - * - * @param tag Name for this type of chunk. - * @param data Data to be interpreted by the subclass. - * @param length Number of bytes of data in the chunk. - * @return true to continue decoding, or false to indicate an error, which - * will cause the decoder to not return the image. - */ - virtual bool readChunk(const char tag[], const void* data, size_t length) = 0; -}; -#endif // SkPngChunkReader_DEFINED |