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

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

Issue 1472933002: Make SkAndroidCodec support ico (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Response to comments Created 5 years 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
« no previous file with comments | « src/codec/SkBmpCodec.cpp ('k') | src/codec/SkBmpStandardCodec.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBmpCodec.h" 8 #include "SkBmpCodec.h"
9 #include "SkColorTable.h" 9 #include "SkColorTable.h"
10 #include "SkImageInfo.h" 10 #include "SkImageInfo.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 * Creates the color table 68 * Creates the color table
69 * Sets colorCount to the new color count if it is non-nullptr 69 * Sets colorCount to the new color count if it is non-nullptr
70 */ 70 */
71 bool createColorTable(SkAlphaType alphaType, int* colorCount); 71 bool createColorTable(SkAlphaType alphaType, int* colorCount);
72 72
73 bool initializeSwizzler(const SkImageInfo& dstInfo, const Options& opts); 73 bool initializeSwizzler(const SkImageInfo& dstInfo, const Options& opts);
74 74
75 int decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, 75 int decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes,
76 const Options& opts) override; 76 const Options& opts) override;
77 77
78 Result decodeIcoMask(const SkImageInfo& dstInfo, void* dst, size_t dstRowByt es); 78 /*
79 * @param stream This may be a pointer to the stream owned by the parent SkC odec
80 * or a sub-stream of the stream owned by the parent SkCodec.
81 * Either way, this stream is unowned.
82 */
83 void decodeIcoMask(SkStream* stream, const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes);
79 84
80 SkAutoTUnref<SkColorTable> fColorTable; // owned 85 SkAutoTUnref<SkColorTable> fColorTable; // owned
81 const uint32_t fNumColors; 86 const uint32_t fNumColors;
82 const uint32_t fBytesPerColor; 87 const uint32_t fBytesPerColor;
83 const uint32_t fOffset; 88 const uint32_t fOffset;
84 SkAutoTDelete<SkSwizzler> fSwizzler; 89 SkAutoTDelete<SkSwizzler> fSwizzler;
85 const size_t fSrcRowBytes; 90 const size_t fSrcRowBytes;
86 SkAutoTDeleteArray<uint8_t> fSrcBuffer; 91 SkAutoTDeleteArray<uint8_t> fSrcBuffer;
87 const bool fInIco; 92 const bool fInIco;
93 const size_t fAndMaskRowBytes; // only used for fInIc o decodes
88 94
89 typedef SkBmpCodec INHERITED; 95 typedef SkBmpCodec INHERITED;
90 }; 96 };
OLDNEW
« no previous file with comments | « src/codec/SkBmpCodec.cpp ('k') | src/codec/SkBmpStandardCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698