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

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: Add SkScanlineOrder enum to SkScanlineDecoder.h Created 5 years, 4 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
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, RowOrder rowOrder);
33 33
34 protected: 34 protected:
35 35
36 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, 36 Result onGetPixels(const SkImageInfo& dstInfo, void* dst,
37 size_t dstRowBytes, const Options&, SkPMColor*, 37 size_t dstRowBytes, const Options&, SkPMColor*,
38 int*) override; 38 int*) override;
39 39
40 private: 40 private:
41 41
42 bool initializeSwizzler(const SkImageInfo& dstInfo); 42 bool initializeSwizzler(const SkImageInfo& dstInfo);
43 43
44 SkCodec::Result onStart(const SkImageInfo& dstInfo, const SkCodec::Options& options,
45 SkPMColor inputColorPtr[], int* inputColorCount) override;
46
44 Result decode(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, 47 Result decode(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes,
45 const Options& opts); 48 const Options& opts) override;
46 49
47 SkAutoTDelete<SkMasks> fMasks; // owned 50 SkAutoTDelete<SkMasks> fMasks; // owned
48 SkAutoTDelete<SkMaskSwizzler> fMaskSwizzler; 51 SkAutoTDelete<SkMaskSwizzler> fMaskSwizzler;
49 SkAutoTDeleteArray<uint8_t> fSrcBuffer; 52 SkAutoTDeleteArray<uint8_t> fSrcBuffer;
50 53
51 typedef SkBmpCodec INHERITED; 54 typedef SkBmpCodec INHERITED;
52 }; 55 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698