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

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

Issue 1689953002: Fix scanline decoding of rare RLE bmps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move comment to header Created 4 years, 10 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 | « resources/rle.bmp ('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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 SkSampler* getSampler(bool createIfNecessary) override; 90 SkSampler* getSampler(bool createIfNecessary) override;
91 91
92 SkAutoTUnref<SkColorTable> fColorTable; // owned 92 SkAutoTUnref<SkColorTable> fColorTable; // owned
93 // fNumColors is the number specified in the header, or 0 if not present in the header. 93 // fNumColors is the number specified in the header, or 0 if not present in the header.
94 const uint32_t fNumColors; 94 const uint32_t fNumColors;
95 const uint32_t fBytesPerColor; 95 const uint32_t fBytesPerColor;
96 const uint32_t fOffset; 96 const uint32_t fOffset;
97 SkAutoTDeleteArray<uint8_t> fStreamBuffer; 97 SkAutoTDeleteArray<uint8_t> fStreamBuffer;
98 size_t fRLEBytes; 98 size_t fRLEBytes;
99 const size_t fOrigRLEBytes;
99 uint32_t fCurrRLEByte; 100 uint32_t fCurrRLEByte;
100 int fSampleX; 101 int fSampleX;
101 SkAutoTDelete<SkSampler> fSampler; 102 SkAutoTDelete<SkSampler> fSampler;
102 103
104 // Scanline decodes allow the client to ask for a single scanline at a time.
105 // This can be tricky when the RLE encoding instructs the decoder to jump do wn
106 // multiple lines. This field keeps track of lines that need to be skipped
107 // on subsequent calls to decodeRows().
108 int fLinesToSkip;
109
103 typedef SkBmpCodec INHERITED; 110 typedef SkBmpCodec INHERITED;
104 }; 111 };
OLDNEW
« no previous file with comments | « resources/rle.bmp ('k') | src/codec/SkBmpRLECodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698