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

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

Issue 1820073002: Add SkEncodedInfo to report properties of encoded image data (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Order of param eval bug Created 4 years, 8 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 | « include/codec/SkEncodedInfo.h ('k') | src/codec/SkBmpCodec.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 #ifndef SkBmpCodec_DEFINED 7 #ifndef SkBmpCodec_DEFINED
8 #define SkBmpCodec_DEFINED 8 #define SkBmpCodec_DEFINED
9 9
10 #include "SkCodec.h" 10 #include "SkCodec.h"
(...skipping 20 matching lines...) Expand all
31 static SkCodec* NewFromStream(SkStream*); 31 static SkCodec* NewFromStream(SkStream*);
32 32
33 /* 33 /*
34 * Creates a bmp decoder for a bmp embedded in ico 34 * Creates a bmp decoder for a bmp embedded in ico
35 * Reads enough of the stream to determine the image format 35 * Reads enough of the stream to determine the image format
36 */ 36 */
37 static SkCodec* NewFromIco(SkStream*); 37 static SkCodec* NewFromIco(SkStream*);
38 38
39 protected: 39 protected:
40 40
41 SkBmpCodec(const SkImageInfo& info, SkStream* stream, uint16_t bitsPerPixel, 41 SkBmpCodec(int width, int height, const SkEncodedInfo& info, SkStream* strea m,
42 SkCodec::SkScanlineOrder rowOrder); 42 uint16_t bitsPerPixel, SkCodec::SkScanlineOrder rowOrder);
43 43
44 SkEncodedFormat onGetEncodedFormat() const override { return kBMP_SkEncodedF ormat; } 44 SkEncodedFormat onGetEncodedFormat() const override { return kBMP_SkEncodedF ormat; }
45 45
46 /* 46 /*
47 * Read enough of the stream to initialize the SkBmpCodec. Returns a bool 47 * Read enough of the stream to initialize the SkBmpCodec. Returns a bool
48 * representing success or failure. If it returned true, and codecOut was 48 * representing success or failure. If it returned true, and codecOut was
49 * not nullptr, it will be set to a new SkBmpCodec. 49 * not nullptr, it will be set to a new SkBmpCodec.
50 * Does *not* take ownership of the passed in SkStream. 50 * Does *not* take ownership of the passed in SkStream.
51 */ 51 */
52 static bool ReadHeader(SkStream*, bool inIco, SkCodec** codecOut); 52 static bool ReadHeader(SkStream*, bool inIco, SkCodec** codecOut);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 bool onSkipScanlines(int count) override; 139 bool onSkipScanlines(int count) override;
140 140
141 const uint16_t fBitsPerPixel; 141 const uint16_t fBitsPerPixel;
142 const SkScanlineOrder fRowOrder; 142 const SkScanlineOrder fRowOrder;
143 const size_t fSrcRowBytes; 143 const size_t fSrcRowBytes;
144 144
145 typedef SkCodec INHERITED; 145 typedef SkCodec INHERITED;
146 }; 146 };
147 147
148 #endif 148 #endif
OLDNEW
« no previous file with comments | « include/codec/SkEncodedInfo.h ('k') | src/codec/SkBmpCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698