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

Side by Side Diff: src/codec/SkCodec_libico.h

Issue 1011343003: Enabling ico decoding with use of png and bmp decoders (Closed) Base URL: https://skia.googlesource.com/skia.git@swizzle
Patch Set: Clean up before public review Created 5 years, 9 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
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "SkCodec.h"
9 #include "SkImageInfo.h"
10 #include "SkStream.h"
11 #include "SkTypes.h"
12
13 /*
14 *
15 * This class implements the decoding for bmp images
16 *
17 */
18 class SkIcoCodec : public SkCodec {
19 public:
20
21 /*
22 *
23 * Checks the start of the stream to see if the image is a Ico or Cur
24 *
25 */
26 static bool IsIco(SkStream*);
27
28 /*
29 *
30 * Assumes IsIco was called and returned true
31 * Creates an Ico decoder
32 * Reads enough of the stream to determine the image format
33 *
34 */
35 static SkCodec* NewFromStream(SkStream*);
36
37 protected:
38
39 /*
40 *
41 * Initiates the Ico decode
42 *
43 */
44 virtual Result onGetPixels(const SkImageInfo& dstInfo, void* dst,
45 size_t dstRowBytes, const Options&, SkPMColor*,
46 int*) SK_OVERRIDE;
47
48 private:
49
50 /*
51 *
52 * Constructor called by NewFromStream
53 * @param embeddedCode codec for the embedded image
54 *
55 */
56 SkIcoCodec(const SkImageInfo& srcInfo, SkStream* stream,
57 SkCodec* embeddedCodec);
58
59 SkAutoTDelete<SkCodec> fEmbeddedCodec; // owned
60
61 typedef SkCodec INHERITED;
62 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698