aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkCodec_libpng.h
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@google.com>2015-03-02 12:31:12 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-02 12:31:12 -0800
commitee1a726aed980016a9371ffa4768e0844c360eb2 (patch)
treed8095a07602a0b66d4a16744e5f9171d9e8ed9c6 /src/codec/SkCodec_libpng.h
parentca358852b4fed656d11107b2aaf28318a4518b49 (diff)
Revert of Add SkCodec, including PNG implementation. (patchset #24 id:460001 of https://codereview.chromium.org/930283002/)
Reason for revert: Breaking windows bots all over the place :( Original issue's description: > Add SkCodec, including PNG implementation. > > DM: > Add a flag to use SkCodec instead of SkImageDecoder. > > SkCodec: > Base class for codecs, allowing creation from an SkStream or an SkData. > An SkCodec, on creation, knows properties of the data like its width and height. Further calls can be used to generate the image. > TODO: Add scanline iterator > > SkPngCodec: > New decoder for png. Wraps libpng. The code has been repurposed from SkImageDecoder_libpng. > TODO: Handle other destination colortypes > TODO: Substitute the transpose color > TODO: Allow silencing warnings > TODO: Use RGB instead of filler? > TODO: sRGB > > SkSwizzler: > Simplified version of SkScaledSampler. Unlike the sampler, this object does no sampling. > TODO: Implement other swizzles. > > BUG=skia:3257 > > Committed: https://skia.googlesource.com/skia/+/ca358852b4fed656d11107b2aaf28318a4518b49 TBR=reed@google.com,djsollen@google.com,msarett@google.com,mtklein@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:3257 Review URL: https://codereview.chromium.org/972743003
Diffstat (limited to 'src/codec/SkCodec_libpng.h')
-rw-r--r--src/codec/SkCodec_libpng.h34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/codec/SkCodec_libpng.h b/src/codec/SkCodec_libpng.h
deleted file mode 100644
index a5327dda41..0000000000
--- a/src/codec/SkCodec_libpng.h
+++ /dev/null
@@ -1,34 +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"
-
-extern "C" {
- // FIXME: I'd like to force all platforms to use the same decoder, but this
- // means an extra dependency on Mac/Win.
- #include "png.h"
-}
-
-class SkStream;
-
-class SkPngCodec : public SkCodec {
-public:
- // Assumes IsPng was called and returned true.
- static SkCodec* NewFromStream(SkStream*);
- static bool IsPng(SkStream*);
-protected:
- Result onGetPixels(const SkImageInfo&, void*, size_t, SkPMColor*, int*) SK_OVERRIDE;
-private:
- png_structp fPng_ptr;
- png_infop fInfo_ptr;
-
- SkPngCodec(const SkImageInfo&, SkStream*, png_structp, png_infop);
- ~SkPngCodec();
-
- typedef SkCodec INHERITED;
-};