| OLD | NEW | 
|---|
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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 "../../../include/fxge/fx_dib.h" | 7 #include "../../../include/fxge/fx_dib.h" | 
| 8 #include "../../../include/fxge/fx_ge.h" | 8 #include "../../../include/fxge/fx_ge.h" | 
| 9 #include "../../../include/fxcodec/fx_codec.h" | 9 #include "../../../include/fxcodec/fx_codec.h" | 
| 10 const FX_DWORD g_dwWinPalette[256] = { | 10 const FX_DWORD g_dwWinPalette[256] = { | 
| (...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1093     } | 1093     } | 
| 1094     return pClone; | 1094     return pClone; | 
| 1095   } | 1095   } | 
| 1096   CFX_DIBitmap* pClone = new CFX_DIBitmap; | 1096   CFX_DIBitmap* pClone = new CFX_DIBitmap; | 
| 1097   if (!pClone->Create(m_Width, m_Height, dest_format)) { | 1097   if (!pClone->Create(m_Width, m_Height, dest_format)) { | 
| 1098     delete pClone; | 1098     delete pClone; | 
| 1099     return NULL; | 1099     return NULL; | 
| 1100   } | 1100   } | 
| 1101   FX_BOOL ret = TRUE; | 1101   FX_BOOL ret = TRUE; | 
| 1102   CFX_DIBitmap* pSrcAlpha = NULL; | 1102   CFX_DIBitmap* pSrcAlpha = NULL; | 
| 1103   if (m_AlphaFlag & 2) { | 1103   if (HasAlpha()) { | 
| 1104     pSrcAlpha = (GetFormat() == FXDIB_Argb) ? GetAlphaMask() : m_pAlphaMask; | 1104     pSrcAlpha = (GetFormat() == FXDIB_Argb) ? GetAlphaMask() : m_pAlphaMask; | 
| 1105     if (pSrcAlpha == NULL) { | 1105     if (pSrcAlpha == NULL) { | 
| 1106       delete pClone; | 1106       delete pClone; | 
| 1107       return NULL; | 1107       return NULL; | 
| 1108     } | 1108     } | 
| 1109   } | 1109   } | 
| 1110   if (dest_format & 0x0200) { | 1110   if (dest_format & 0x0200) { | 
| 1111     if (dest_format == FXDIB_Argb) | 1111     if (dest_format == FXDIB_Argb) | 
| 1112       ret = pSrcAlpha ? pClone->LoadChannel(FXDIB_Alpha, pSrcAlpha, FXDIB_Alpha) | 1112       ret = pSrcAlpha ? pClone->LoadChannel(FXDIB_Alpha, pSrcAlpha, FXDIB_Alpha) | 
| 1113                       : pClone->LoadChannel(FXDIB_Alpha, 0xff); | 1113                       : pClone->LoadChannel(FXDIB_Alpha, 0xff); | 
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1221   if (!m_bExtBuf) { | 1221   if (!m_bExtBuf) { | 
| 1222     FX_Free(m_pBuffer); | 1222     FX_Free(m_pBuffer); | 
| 1223   } | 1223   } | 
| 1224   m_bExtBuf = FALSE; | 1224   m_bExtBuf = FALSE; | 
| 1225   m_pBuffer = dest_buf; | 1225   m_pBuffer = dest_buf; | 
| 1226   m_bpp = (uint8_t)dest_format; | 1226   m_bpp = (uint8_t)dest_format; | 
| 1227   m_AlphaFlag = (uint8_t)(dest_format >> 8); | 1227   m_AlphaFlag = (uint8_t)(dest_format >> 8); | 
| 1228   m_Pitch = dest_pitch; | 1228   m_Pitch = dest_pitch; | 
| 1229   return TRUE; | 1229   return TRUE; | 
| 1230 } | 1230 } | 
| OLD | NEW | 
|---|