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

Side by Side Diff: core/fxcodec/jbig2/JBig2_BitStream.cpp

Issue 2383543002: Move core/fpdfapi/fpdf_parser/include to core/fpdfapi/fpdf_parser (Closed)
Patch Set: Created 4 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 | « core/fxcodec/codec/fx_codec_jbig.cpp ('k') | core/fxcodec/jbig2/JBig2_Context.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 // Copyright 2015 PDFium Authors. All rights reserved. 1 // Copyright 2015 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fxcodec/jbig2/JBig2_BitStream.h" 7 #include "core/fxcodec/jbig2/JBig2_BitStream.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" 11 #include "core/fpdfapi/fpdf_parser/cpdf_stream.h"
12 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" 12 #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h"
13 13
14 CJBig2_BitStream::CJBig2_BitStream(CPDF_StreamAcc* pSrcStream) 14 CJBig2_BitStream::CJBig2_BitStream(CPDF_StreamAcc* pSrcStream)
15 : m_pBuf(pSrcStream->GetData()), 15 : m_pBuf(pSrcStream->GetData()),
16 m_dwLength(pSrcStream->GetSize()), 16 m_dwLength(pSrcStream->GetSize()),
17 m_dwByteIdx(0), 17 m_dwByteIdx(0),
18 m_dwBitIdx(0), 18 m_dwBitIdx(0),
19 m_dwObjNum(pSrcStream->GetStream() ? pSrcStream->GetStream()->GetObjNum() 19 m_dwObjNum(pSrcStream->GetStream() ? pSrcStream->GetStream()->GetObjNum()
20 : 0) { 20 : 0) {
21 if (m_dwLength > 256 * 1024 * 1024) { 21 if (m_dwLength > 256 * 1024 * 1024) {
22 m_dwLength = 0; 22 m_dwLength = 0;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 return m_dwByteIdx < m_dwLength; 180 return m_dwByteIdx < m_dwLength;
181 } 181 }
182 182
183 uint32_t CJBig2_BitStream::LengthInBits() const { 183 uint32_t CJBig2_BitStream::LengthInBits() const {
184 return m_dwLength << 3; 184 return m_dwLength << 3;
185 } 185 }
186 186
187 uint32_t CJBig2_BitStream::getObjNum() const { 187 uint32_t CJBig2_BitStream::getObjNum() const {
188 return m_dwObjNum; 188 return m_dwObjNum;
189 } 189 }
OLDNEW
« no previous file with comments | « core/fxcodec/codec/fx_codec_jbig.cpp ('k') | core/fxcodec/jbig2/JBig2_Context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698