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

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

Issue 1332053002: Fill incomplete images in SkCodec parent class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use aligned memory in swizzler test Created 5 years, 2 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/SkBmpMaskCodec.cpp ('k') | src/codec/SkBmpRLECodec.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 28 matching lines...) Expand all
39 uint16_t bitsPerPixel, uint32_t numColors, uint32_t bytesPerColor, 39 uint16_t bitsPerPixel, uint32_t numColors, uint32_t bytesPerColor,
40 uint32_t offset, SkCodec::SkScanlineOrder rowOrder, 40 uint32_t offset, SkCodec::SkScanlineOrder rowOrder,
41 size_t RLEBytes); 41 size_t RLEBytes);
42 42
43 int setSampleX(int); 43 int setSampleX(int);
44 44
45 protected: 45 protected:
46 46
47 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, 47 Result onGetPixels(const SkImageInfo& dstInfo, void* dst,
48 size_t dstRowBytes, const Options&, SkPMColor*, 48 size_t dstRowBytes, const Options&, SkPMColor*,
49 int*) override; 49 int*, int*) override;
50 50
51 SkCodec::Result prepareToDecode(const SkImageInfo& dstInfo, 51 SkCodec::Result prepareToDecode(const SkImageInfo& dstInfo,
52 const SkCodec::Options& options, SkPMColor inputColorPtr[], 52 const SkCodec::Options& options, SkPMColor inputColorPtr[],
53 int* inputColorCount) override; 53 int* inputColorCount) override;
54 54
55 private: 55 private:
56 56
57 /* 57 /*
58 * Creates the color table 58 * Creates the color table
59 * Sets colorCount to the new color count if it is non-nullptr 59 * Sets colorCount to the new color count if it is non-nullptr
(...skipping 17 matching lines...) Expand all
77 void setPixel(void* dst, size_t dstRowBytes, 77 void setPixel(void* dst, size_t dstRowBytes,
78 const SkImageInfo& dstInfo, uint32_t x, uint32_t y, 78 const SkImageInfo& dstInfo, uint32_t x, uint32_t y,
79 uint8_t index); 79 uint8_t index);
80 /* 80 /*
81 * Set an RLE24 pixel from R, G, B values 81 * Set an RLE24 pixel from R, G, B values
82 */ 82 */
83 void setRGBPixel(void* dst, size_t dstRowBytes, 83 void setRGBPixel(void* dst, size_t dstRowBytes,
84 const SkImageInfo& dstInfo, uint32_t x, uint32_t y, 84 const SkImageInfo& dstInfo, uint32_t x, uint32_t y,
85 uint8_t red, uint8_t green, uint8_t blue); 85 uint8_t red, uint8_t green, uint8_t blue);
86 86
87 Result decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, 87 int decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes,
88 const Options& opts) override; 88 const Options& opts) override;
89 89
90 SkSampler* getSampler() override; 90 SkSampler* getSampler(bool createIfNecessary) override;
91 91
92 SkAutoTUnref<SkColorTable> fColorTable; // owned 92 SkAutoTUnref<SkColorTable> fColorTable; // owned
93 const uint32_t fNumColors; 93 const uint32_t fNumColors;
94 const uint32_t fBytesPerColor; 94 const uint32_t fBytesPerColor;
95 const uint32_t fOffset; 95 const uint32_t fOffset;
96 SkAutoTDeleteArray<uint8_t> fStreamBuffer; 96 SkAutoTDeleteArray<uint8_t> fStreamBuffer;
97 size_t fRLEBytes; 97 size_t fRLEBytes;
98 uint32_t fCurrRLEByte; 98 uint32_t fCurrRLEByte;
99 int fSampleX; 99 int fSampleX;
100 SkAutoTDelete<SkSampler> fSampler; 100 SkAutoTDelete<SkSampler> fSampler;
101 101
102 typedef SkBmpCodec INHERITED; 102 typedef SkBmpCodec INHERITED;
103 }; 103 };
OLDNEW
« no previous file with comments | « src/codec/SkBmpMaskCodec.cpp ('k') | src/codec/SkBmpRLECodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698