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

Side by Side Diff: core/src/fxge/dib/fx_dib_convert.cpp

Issue 1409223002: fxcrt convergence - XFA side. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: GN. Created 5 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/src/fxge/apple/fx_mac_imp.cpp ('k') | core/src/fxge/dib/fx_dib_engine.cpp » ('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 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 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 if (pClone == NULL) { 1087 if (pClone == NULL) {
1088 return NULL; 1088 return NULL;
1089 } 1089 }
1090 if (!pClone->ConvertFormat(dest_format, pIccTransform)) { 1090 if (!pClone->ConvertFormat(dest_format, pIccTransform)) {
1091 delete pClone; 1091 delete pClone;
1092 return NULL; 1092 return NULL;
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) {
1098 return NULL;
1099 }
1100 if (!pClone->Create(m_Width, m_Height, dest_format)) { 1097 if (!pClone->Create(m_Width, m_Height, dest_format)) {
1101 delete pClone; 1098 delete pClone;
1102 return NULL; 1099 return NULL;
1103 } 1100 }
1104 FX_BOOL ret = TRUE; 1101 FX_BOOL ret = TRUE;
1105 CFX_DIBitmap* pSrcAlpha = NULL; 1102 CFX_DIBitmap* pSrcAlpha = NULL;
1106 if (m_AlphaFlag & 2) { 1103 if (m_AlphaFlag & 2) {
1107 pSrcAlpha = (GetFormat() == FXDIB_Argb) ? GetAlphaMask() : m_pAlphaMask; 1104 pSrcAlpha = (GetFormat() == FXDIB_Argb) ? GetAlphaMask() : m_pAlphaMask;
1108 if (pSrcAlpha == NULL) { 1105 if (pSrcAlpha == NULL) {
1109 delete pClone; 1106 delete pClone;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 if (!m_bExtBuf) { 1221 if (!m_bExtBuf) {
1225 FX_Free(m_pBuffer); 1222 FX_Free(m_pBuffer);
1226 } 1223 }
1227 m_bExtBuf = FALSE; 1224 m_bExtBuf = FALSE;
1228 m_pBuffer = dest_buf; 1225 m_pBuffer = dest_buf;
1229 m_bpp = (uint8_t)dest_format; 1226 m_bpp = (uint8_t)dest_format;
1230 m_AlphaFlag = (uint8_t)(dest_format >> 8); 1227 m_AlphaFlag = (uint8_t)(dest_format >> 8);
1231 m_Pitch = dest_pitch; 1228 m_Pitch = dest_pitch;
1232 return TRUE; 1229 return TRUE;
1233 } 1230 }
OLDNEW
« no previous file with comments | « core/src/fxge/apple/fx_mac_imp.cpp ('k') | core/src/fxge/dib/fx_dib_engine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698