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

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

Issue 1895383002: Revert of Add SkEncodedInfo to report properties of encoded image data (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « src/codec/SkBmpMaskCodec.h ('k') | src/codec/SkBmpRLECodec.h » ('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 "SkBmpMaskCodec.h" 8 #include "SkBmpMaskCodec.h"
9 #include "SkCodecPriv.h" 9 #include "SkCodecPriv.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
11 11
12 /* 12 /*
13 * Creates an instance of the decoder 13 * Creates an instance of the decoder
14 */ 14 */
15 SkBmpMaskCodec::SkBmpMaskCodec(int width, int height, const SkEncodedInfo& info, SkStream* stream, 15 SkBmpMaskCodec::SkBmpMaskCodec(const SkImageInfo& info, SkStream* stream,
16 uint16_t bitsPerPixel, SkMasks* masks, 16 uint16_t bitsPerPixel, SkMasks* masks,
17 SkCodec::SkScanlineOrder rowOrder) 17 SkCodec::SkScanlineOrder rowOrder)
18 : INHERITED(width, height, info, stream, bitsPerPixel, rowOrder) 18 : INHERITED(info, stream, bitsPerPixel, rowOrder)
19 , fMasks(masks) 19 , fMasks(masks)
20 , fMaskSwizzler(nullptr) 20 , fMaskSwizzler(nullptr)
21 , fSrcBuffer(new uint8_t [this->srcRowBytes()]) 21 , fSrcBuffer(new uint8_t [this->srcRowBytes()])
22 {} 22 {}
23 23
24 /* 24 /*
25 * Initiates the bitmap decode 25 * Initiates the bitmap decode
26 */ 26 */
27 SkCodec::Result SkBmpMaskCodec::onGetPixels(const SkImageInfo& dstInfo, 27 SkCodec::Result SkBmpMaskCodec::onGetPixels(const SkImageInfo& dstInfo,
28 void* dst, size_t dstRowBytes, 28 void* dst, size_t dstRowBytes,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 // Decode the row in destination format 86 // Decode the row in destination format
87 uint32_t row = this->getDstRow(y, height); 87 uint32_t row = this->getDstRow(y, height);
88 void* dstRow = SkTAddOffset<void>(dst, row * dstRowBytes); 88 void* dstRow = SkTAddOffset<void>(dst, row * dstRowBytes);
89 fMaskSwizzler->swizzle(dstRow, srcRow); 89 fMaskSwizzler->swizzle(dstRow, srcRow);
90 } 90 }
91 91
92 // Finished decoding the entire image 92 // Finished decoding the entire image
93 return height; 93 return height;
94 } 94 }
OLDNEW
« no previous file with comments | « src/codec/SkBmpMaskCodec.h ('k') | src/codec/SkBmpRLECodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698