| OLD | NEW | 
|    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 "JBig2_GrrdProc.h" |    7 #include "JBig2_GrrdProc.h" | 
|    8  |    8  | 
|    9 #include "../../../../third_party/base/nonstd_unique_ptr.h" |  | 
|   10 #include "JBig2_ArithDecoder.h" |    9 #include "JBig2_ArithDecoder.h" | 
|   11 #include "JBig2_BitStream.h" |   10 #include "JBig2_BitStream.h" | 
|   12 #include "JBig2_Image.h" |   11 #include "JBig2_Image.h" | 
 |   12 #include "third_party/base/nonstd_unique_ptr.h" | 
|   13  |   13  | 
|   14 CJBig2_Image* CJBig2_GRRDProc::decode(CJBig2_ArithDecoder* pArithDecoder, |   14 CJBig2_Image* CJBig2_GRRDProc::decode(CJBig2_ArithDecoder* pArithDecoder, | 
|   15                                       JBig2ArithCtx* grContext) { |   15                                       JBig2ArithCtx* grContext) { | 
|   16   if (GRW == 0 || GRH == 0) |   16   if (GRW == 0 || GRH == 0) | 
|   17     return new CJBig2_Image(GRW, GRH); |   17     return new CJBig2_Image(GRW, GRH); | 
|   18  |   18  | 
|   19   if (GRTEMPLATE == 0) { |   19   if (GRTEMPLATE == 0) { | 
|   20     if ((GRAT[0] == -1) && (GRAT[1] == -1) && (GRAT[2] == -1) && |   20     if ((GRAT[0] == -1) && (GRAT[1] == -1) && (GRAT[2] == -1) && | 
|   21         (GRAT[3] == -1) && (GRREFERENCEDX == 0) && |   21         (GRAT[3] == -1) && (GRREFERENCEDX == 0) && | 
|   22         (GRW == (FX_DWORD)GRREFERENCE->m_nWidth)) { |   22         (GRW == (FX_DWORD)GRREFERENCE->m_nWidth)) { | 
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  506         pLine[w >> 3] = cVal; |  506         pLine[w >> 3] = cVal; | 
|  507       } |  507       } | 
|  508     } |  508     } | 
|  509     pLine += nStride; |  509     pLine += nStride; | 
|  510     if (h < GRHR + GRREFERENCEDY) { |  510     if (h < GRHR + GRREFERENCEDY) { | 
|  511       pLineR += nStrideR; |  511       pLineR += nStrideR; | 
|  512     } |  512     } | 
|  513   } |  513   } | 
|  514   return GRREG.release(); |  514   return GRREG.release(); | 
|  515 } |  515 } | 
| OLD | NEW |