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

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

Issue 1287423002: Scanline decoding for bmp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix windows errors Created 5 years, 3 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
« no previous file with comments | « src/codec/SkBmpCodec.cpp ('k') | src/codec/SkBmpMaskCodec.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 "SkImageInfo.h" 9 #include "SkImageInfo.h"
10 #include "SkMaskSwizzler.h" 10 #include "SkMaskSwizzler.h"
(...skipping 11 matching lines...) Expand all
22 * Called only by SkBmpCodec::NewFromStream 22 * Called only by SkBmpCodec::NewFromStream
23 * There should be no other callers despite this being public 23 * There should be no other callers despite this being public
24 * 24 *
25 * @param srcInfo contains the source width and height 25 * @param srcInfo contains the source width and height
26 * @param stream the stream of encoded image data 26 * @param stream the stream of encoded image data
27 * @param bitsPerPixel the number of bits used to store each pixel 27 * @param bitsPerPixel the number of bits used to store each pixel
28 * @param masks color masks for certain bmp formats 28 * @param masks color masks for certain bmp formats
29 * @param rowOrder indicates whether rows are ordered top-down or bottom-up 29 * @param rowOrder indicates whether rows are ordered top-down or bottom-up
30 */ 30 */
31 SkBmpMaskCodec(const SkImageInfo& srcInfo, SkStream* stream, 31 SkBmpMaskCodec(const SkImageInfo& srcInfo, SkStream* stream,
32 uint16_t bitsPerPixel, SkMasks* masks, RowOrder rowOrder); 32 uint16_t bitsPerPixel, SkMasks* masks,
33 SkScanlineDecoder::SkScanlineOrder rowOrder);
33 34
34 protected: 35 protected:
35 36
36 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, 37 Result onGetPixels(const SkImageInfo& dstInfo, void* dst,
37 size_t dstRowBytes, const Options&, SkPMColor*, 38 size_t dstRowBytes, const Options&, SkPMColor*,
38 int*) override; 39 int*) override;
39 40
41 SkCodec::Result prepareToDecode(const SkImageInfo& dstInfo,
42 const SkCodec::Options& options, SkPMColor inputColorPtr[],
43 int* inputColorCount) override;
44
40 private: 45 private:
41 46
42 bool initializeSwizzler(const SkImageInfo& dstInfo); 47 bool initializeSwizzler(const SkImageInfo& dstInfo);
43 48
44 Result decode(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, 49 Result decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes,
45 const Options& opts); 50 const Options& opts) override;
46 51
47 SkAutoTDelete<SkMasks> fMasks; // owned 52 SkAutoTDelete<SkMasks> fMasks; // owned
48 SkAutoTDelete<SkMaskSwizzler> fMaskSwizzler; 53 SkAutoTDelete<SkMaskSwizzler> fMaskSwizzler;
54 const size_t fSrcRowBytes;
49 SkAutoTDeleteArray<uint8_t> fSrcBuffer; 55 SkAutoTDeleteArray<uint8_t> fSrcBuffer;
50 56
51 typedef SkBmpCodec INHERITED; 57 typedef SkBmpCodec INHERITED;
52 }; 58 };
OLDNEW
« no previous file with comments | « src/codec/SkBmpCodec.cpp ('k') | src/codec/SkBmpMaskCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698