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

Side by Side Diff: src/codec/SkBmpRLECodec.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/SkBmpRLECodec.h ('k') | src/codec/SkBmpStandardCodec.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 "SkBmpRLECodec.h" 8 #include "SkBmpRLECodec.h"
9 #include "SkCodecPriv.h" 9 #include "SkCodecPriv.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
11 #include "SkStream.h" 11 #include "SkStream.h"
12 12
13 /* 13 /*
14 * Creates an instance of the decoder 14 * Creates an instance of the decoder
15 * Called only by NewFromStream 15 * Called only by NewFromStream
16 */ 16 */
17 SkBmpRLECodec::SkBmpRLECodec(int width, int height, const SkEncodedInfo& info, S kStream* stream, 17 SkBmpRLECodec::SkBmpRLECodec(const SkImageInfo& info, SkStream* stream,
18 uint16_t bitsPerPixel, uint32_t numColors, 18 uint16_t bitsPerPixel, uint32_t numColors,
19 uint32_t bytesPerColor, uint32_t offset, 19 uint32_t bytesPerColor, uint32_t offset,
20 SkCodec::SkScanlineOrder rowOrder, 20 SkCodec::SkScanlineOrder rowOrder,
21 size_t RLEBytes) 21 size_t RLEBytes)
22 : INHERITED(width, height, info, stream, bitsPerPixel, rowOrder) 22 : INHERITED(info, stream, bitsPerPixel, rowOrder)
23 , fColorTable(nullptr) 23 , fColorTable(nullptr)
24 , fNumColors(numColors) 24 , fNumColors(numColors)
25 , fBytesPerColor(bytesPerColor) 25 , fBytesPerColor(bytesPerColor)
26 , fOffset(offset) 26 , fOffset(offset)
27 , fStreamBuffer(new uint8_t[RLEBytes]) 27 , fStreamBuffer(new uint8_t[RLEBytes])
28 , fRLEBytes(RLEBytes) 28 , fRLEBytes(RLEBytes)
29 , fOrigRLEBytes(RLEBytes) 29 , fOrigRLEBytes(RLEBytes)
30 , fCurrRLEByte(0) 30 , fCurrRLEByte(0)
31 , fSampleX(1) 31 , fSampleX(1)
32 {} 32 {}
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 fSampler.reset(new SkBmpRLESampler(this)); 539 fSampler.reset(new SkBmpRLESampler(this));
540 } 540 }
541 541
542 return fSampler; 542 return fSampler;
543 } 543 }
544 544
545 int SkBmpRLECodec::setSampleX(int sampleX){ 545 int SkBmpRLECodec::setSampleX(int sampleX){
546 fSampleX = sampleX; 546 fSampleX = sampleX;
547 return get_scaled_dimension(this->getInfo().width(), sampleX); 547 return get_scaled_dimension(this->getInfo().width(), sampleX);
548 } 548 }
OLDNEW
« no previous file with comments | « src/codec/SkBmpRLECodec.h ('k') | src/codec/SkBmpStandardCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698