Chromium Code Reviews| 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_ge.h" | 7 #include "../../../include/fxge/fx_ge.h" |
| 8 #include "../../../include/fxcodec/fx_codec.h" | 8 #include "../../../include/fxcodec/fx_codec.h" |
| 9 #include "../../../include/fpdfapi/fpdf_module.h" | 9 #include "../../../include/fpdfapi/fpdf_module.h" |
| 10 #include "../../../include/fpdfapi/fpdf_render.h" | 10 #include "../../../include/fpdfapi/fpdf_render.h" |
| (...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 904 } | 904 } |
| 905 m_pColorSpace->GetRGB(temp_buf, R, G, B); | 905 m_pColorSpace->GetRGB(temp_buf, R, G, B); |
| 906 FX_Free(temp_buf); | 906 FX_Free(temp_buf); |
| 907 } else { | 907 } else { |
| 908 m_pColorSpace->GetRGB(color_value, R, G, B); | 908 m_pColorSpace->GetRGB(color_value, R, G, B); |
| 909 } | 909 } |
| 910 SetPaletteArgb(i, ArgbEncode(255, FXSYS_round(R * 255), FXSYS_round( G * 255), FXSYS_round(B * 255))); | 910 SetPaletteArgb(i, ArgbEncode(255, FXSYS_round(R * 255), FXSYS_round( G * 255), FXSYS_round(B * 255))); |
| 911 } | 911 } |
| 912 } | 912 } |
| 913 } | 913 } |
| 914 FX_DWORD CPDF_DIBSource::GetValidBpp() const | 914 FX_DWORD CPDF_DIBSource::GetValidBpc() const |
| 915 { | 915 { |
| 916 FX_DWORD bpc = m_bpc; | 916 FX_DWORD bpc = m_bpc; |
| 917 CPDF_Object * pFilter = m_pDict->GetElementValue(FX_BSTRC("Filter")); | 917 CPDF_Object * pFilter = m_pDict->GetElementValue(FX_BSTRC("Filter")); |
| 918 if (pFilter) { | 918 if (pFilter) { |
| 919 if (pFilter->GetType() == PDFOBJ_NAME) { | 919 if (pFilter->GetType() == PDFOBJ_NAME) { |
| 920 CFX_ByteString filter = pFilter->GetString(); | 920 CFX_ByteString filter = pFilter->GetString(); |
| 921 if (filter == FX_BSTRC("CCITTFaxDecode") || filter == FX_BSTRC("JBIG 2Decode")) { | 921 if (filter == FX_BSTRC("CCITTFaxDecode") || filter == FX_BSTRC("JBIG 2Decode")) { |
| 922 bpc = 1; | 922 bpc = 1; |
| 923 } | 923 } |
| 924 if (filter == FX_BSTRC("RunLengthDecode") || filter == FX_BSTRC("DCT Decode")) { | 924 if (filter == FX_BSTRC("RunLengthDecode") || filter == FX_BSTRC("DCT Decode")) { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 958 FX_LPCBYTE src_pos = src_scan; | 958 FX_LPCBYTE src_pos = src_scan; |
| 959 for (int column = 0; column < m_Width; column ++) { | 959 for (int column = 0; column < m_Width; column ++) { |
| 960 *dest_scan++ = src_pos[2]; | 960 *dest_scan++ = src_pos[2]; |
| 961 *dest_scan++ = src_pos[1]; | 961 *dest_scan++ = src_pos[1]; |
| 962 *dest_scan++ = *src_pos; | 962 *dest_scan++ = *src_pos; |
| 963 src_pos += 3; | 963 src_pos += 3; |
| 964 } | 964 } |
| 965 } else { | 965 } else { |
| 966 int src_bit_pos = 0; | 966 int src_bit_pos = 0; |
| 967 int dest_byte_pos = 0; | 967 int dest_byte_pos = 0; |
| 968 FX_DWORD bpc = GetValidBpp(); | 968 FX_DWORD bpc = GetValidBpc(); |
| 969 for (int column = 0; column < m_Width; column ++) { | 969 for (int column = 0; column < m_Width; column ++) { |
| 970 int R = _GetBits8(src_scan, src_bit_pos, bpc); | 970 int R = _GetBits8(src_scan, src_bit_pos, bpc); |
| 971 src_bit_pos += bpc; | 971 src_bit_pos += bpc; |
| 972 int G = _GetBits8(src_scan, src_bit_pos, bpc); | 972 int G = _GetBits8(src_scan, src_bit_pos, bpc); |
| 973 src_bit_pos += bpc; | 973 src_bit_pos += bpc; |
| 974 int B = _GetBits8(src_scan, src_bit_pos, bpc); | 974 int B = _GetBits8(src_scan, src_bit_pos, bpc); |
| 975 src_bit_pos += bpc; | 975 src_bit_pos += bpc; |
| 976 R = NORMALCOLOR_MAX(R, max_data); | 976 R = NORMALCOLOR_MAX(R, max_data); |
| 977 G = NORMALCOLOR_MAX(G, max_data); | 977 G = NORMALCOLOR_MAX(G, max_data); |
| 978 B = NORMALCOLOR_MAX(B, max_data); | 978 B = NORMALCOLOR_MAX(B, max_data); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1014 G = NORMALCOLOR_MAX(G, 1); | 1014 G = NORMALCOLOR_MAX(G, 1); |
| 1015 B = NORMALCOLOR_MAX(B, 1); | 1015 B = NORMALCOLOR_MAX(B, 1); |
| 1016 dest_scan[dest_byte_pos] = (FX_INT32)(B * 255); | 1016 dest_scan[dest_byte_pos] = (FX_INT32)(B * 255); |
| 1017 dest_scan[dest_byte_pos + 1] = (FX_INT32)(G * 255); | 1017 dest_scan[dest_byte_pos + 1] = (FX_INT32)(G * 255); |
| 1018 dest_scan[dest_byte_pos + 2] = (FX_INT32)(R * 255); | 1018 dest_scan[dest_byte_pos + 2] = (FX_INT32)(R * 255); |
| 1019 dest_byte_pos += 3; | 1019 dest_byte_pos += 3; |
| 1020 } | 1020 } |
| 1021 } else { | 1021 } else { |
| 1022 int src_bit_pos = 0; | 1022 int src_bit_pos = 0; |
| 1023 int dest_byte_pos = 0; | 1023 int dest_byte_pos = 0; |
| 1024 FX_DWORD bpc = GetValidBpp(); | 1024 FX_DWORD bpc = GetValidBpc(); |
| 1025 for (int column = 0; column < m_Width; column ++) { | 1025 for (int column = 0; column < m_Width; column ++) { |
| 1026 for (FX_DWORD color = 0; color < m_nComponents; color ++) { | 1026 for (FX_DWORD color = 0; color < m_nComponents; color ++) { |
| 1027 int data = _GetBits8(src_scan, src_bit_pos, bpc); | 1027 int data = _GetBits8(src_scan, src_bit_pos, bpc); |
| 1028 color_values[color] = m_pCompData[color].m_DecodeMin + | 1028 color_values[color] = m_pCompData[color].m_DecodeMin + |
| 1029 m_pCompData[color].m_DecodeStep * data; | 1029 m_pCompData[color].m_DecodeStep * data; |
| 1030 src_bit_pos += bpc; | 1030 src_bit_pos += bpc; |
| 1031 } | 1031 } |
| 1032 if (m_bLoadMask && m_GroupFamily == PDFCS_DEVICECMYK && m_Family == PDFCS_DEVICECMYK) { | 1032 if (m_bLoadMask && m_GroupFamily == PDFCS_DEVICECMYK && m_Family == PDFCS_DEVICECMYK) { |
| 1033 FX_FLOAT k = 1.0f - color_values[3]; | 1033 FX_FLOAT k = 1.0f - color_values[3]; |
| 1034 R = (1.0f - color_values[0]) * k; | 1034 R = (1.0f - color_values[0]) * k; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1177 FX_BOOL CPDF_DIBSource::SkipToScanline(int line, IFX_Pause* pPause) const | 1177 FX_BOOL CPDF_DIBSource::SkipToScanline(int line, IFX_Pause* pPause) const |
| 1178 { | 1178 { |
| 1179 if (m_pDecoder) { | 1179 if (m_pDecoder) { |
| 1180 return m_pDecoder->SkipToScanline(line, pPause); | 1180 return m_pDecoder->SkipToScanline(line, pPause); |
| 1181 } | 1181 } |
| 1182 return FALSE; | 1182 return FALSE; |
| 1183 } | 1183 } |
| 1184 void CPDF_DIBSource::DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_ bpp, | 1184 void CPDF_DIBSource::DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_ bpp, |
| 1185 int dest_width, FX_BOOL bFlipX, int clip _left, int clip_width) const | 1185 int dest_width, FX_BOOL bFlipX, int clip _left, int clip_width) const |
| 1186 { | 1186 { |
| 1187 FX_DWORD bpc = GetValidBpc(); | |
| 1187 FX_DWORD src_width = m_Width; | 1188 FX_DWORD src_width = m_Width; |
| 1188 FX_DWORD src_pitch = (src_width * m_bpc * m_nComponents + 7) / 8; | 1189 FX_DWORD src_pitch = (src_width * bpc * m_nComponents + 7) / 8; |
|
palmer
2014/07/07 19:36:04
All the arithmetic in this function looks dangerou
jun_fang
2014/07/07 21:14:08
This fix is used for that crashing issue. I alread
| |
| 1189 FX_LPCBYTE pSrcLine = NULL; | 1190 FX_LPCBYTE pSrcLine = NULL; |
| 1190 if (m_pCachedBitmap) { | 1191 if (m_pCachedBitmap) { |
| 1191 pSrcLine = m_pCachedBitmap->GetScanline(line); | 1192 pSrcLine = m_pCachedBitmap->GetScanline(line); |
| 1192 } else if (m_pDecoder) { | 1193 } else if (m_pDecoder) { |
| 1193 pSrcLine = m_pDecoder->GetScanline(line); | 1194 pSrcLine = m_pDecoder->GetScanline(line); |
| 1194 } else { | 1195 } else { |
| 1195 if (m_pStreamAcc->GetSize() >= (line + 1) * src_pitch) { | 1196 if (m_pStreamAcc->GetSize() >= (line + 1) * src_pitch) { |
| 1196 pSrcLine = m_pStreamAcc->GetData() + line * src_pitch; | 1197 pSrcLine = m_pStreamAcc->GetData() + line * src_pitch; |
| 1197 } | 1198 } |
| 1198 } | 1199 } |
| 1199 int orig_Bpp = m_bpc * m_nComponents / 8; | 1200 int orig_Bpp = bpc * m_nComponents / 8; |
| 1200 int dest_Bpp = dest_bpp / 8; | 1201 int dest_Bpp = dest_bpp / 8; |
| 1201 if (pSrcLine == NULL) { | 1202 if (pSrcLine == NULL) { |
| 1202 FXSYS_memset32(dest_scan, 0xff, dest_Bpp * clip_width); | 1203 FXSYS_memset32(dest_scan, 0xff, dest_Bpp * clip_width); |
| 1203 return; | 1204 return; |
| 1204 } | 1205 } |
| 1205 CFX_FixedBufGrow<FX_BYTE, 128> temp(orig_Bpp); | 1206 CFX_FixedBufGrow<FX_BYTE, 128> temp(orig_Bpp); |
| 1206 if (m_bpc * m_nComponents == 1) { | 1207 if (bpc * m_nComponents == 1) { |
| 1207 FX_DWORD set_argb = (FX_DWORD) - 1, reset_argb = 0; | 1208 FX_DWORD set_argb = (FX_DWORD) - 1, reset_argb = 0; |
| 1208 if (m_bImageMask) { | 1209 if (m_bImageMask) { |
| 1209 if (m_bDefaultDecode) { | 1210 if (m_bDefaultDecode) { |
| 1210 set_argb = 0; | 1211 set_argb = 0; |
| 1211 reset_argb = (FX_DWORD) - 1; | 1212 reset_argb = (FX_DWORD) - 1; |
| 1212 } | 1213 } |
| 1213 } else if (m_bColorKey) { | 1214 } else if (m_bColorKey) { |
| 1214 reset_argb = m_pPalette ? m_pPalette[0] : 0xff000000; | 1215 reset_argb = m_pPalette ? m_pPalette[0] : 0xff000000; |
| 1215 set_argb = m_pPalette ? m_pPalette[1] : 0xffffffff; | 1216 set_argb = m_pPalette ? m_pPalette[1] : 0xffffffff; |
| 1216 if (m_pCompData[0].m_ColorKeyMin == 0) { | 1217 if (m_pCompData[0].m_ColorKeyMin == 0) { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1264 } else if (dest_Bpp == 3) { | 1265 } else if (dest_Bpp == 3) { |
| 1265 dest_scan[dest_pos] = FXARGB_B(reset_argb); | 1266 dest_scan[dest_pos] = FXARGB_B(reset_argb); |
| 1266 dest_scan[dest_pos + 1] = FXARGB_G(reset_argb); | 1267 dest_scan[dest_pos + 1] = FXARGB_G(reset_argb); |
| 1267 dest_scan[dest_pos + 2] = FXARGB_R(reset_argb); | 1268 dest_scan[dest_pos + 2] = FXARGB_R(reset_argb); |
| 1268 } else { | 1269 } else { |
| 1269 *(FX_DWORD*)(dest_scan + dest_pos) = reset_argb; | 1270 *(FX_DWORD*)(dest_scan + dest_pos) = reset_argb; |
| 1270 } | 1271 } |
| 1271 } | 1272 } |
| 1272 } | 1273 } |
| 1273 return; | 1274 return; |
| 1274 } else if (m_bpc * m_nComponents <= 8) { | 1275 } else if (bpc * m_nComponents <= 8) { |
| 1275 if (m_bpc < 8) { | 1276 if (bpc < 8) { |
| 1276 int src_bit_pos = 0; | 1277 int src_bit_pos = 0; |
| 1277 for (FX_DWORD col = 0; col < src_width; col ++) { | 1278 for (FX_DWORD col = 0; col < src_width; col ++) { |
| 1278 int color_index = 0; | 1279 int color_index = 0; |
| 1279 for (FX_DWORD color = 0; color < m_nComponents; color ++) { | 1280 for (FX_DWORD color = 0; color < m_nComponents; color ++) { |
| 1280 int data = _GetBits8(pSrcLine, src_bit_pos, m_bpc); | 1281 int data = _GetBits8(pSrcLine, src_bit_pos, bpc); |
| 1281 color_index |= data << (color * m_bpc); | 1282 color_index |= data << (color * bpc); |
| 1282 src_bit_pos += m_bpc; | 1283 src_bit_pos += bpc; |
| 1283 } | 1284 } |
| 1284 m_pLineBuf[col] = color_index; | 1285 m_pLineBuf[col] = color_index; |
| 1285 } | 1286 } |
| 1286 pSrcLine = m_pLineBuf; | 1287 pSrcLine = m_pLineBuf; |
| 1287 } | 1288 } |
| 1288 if (m_bColorKey) { | 1289 if (m_bColorKey) { |
| 1289 for (int i = 0; i < clip_width; i ++) { | 1290 for (int i = 0; i < clip_width; i ++) { |
| 1290 FX_DWORD src_x = (clip_left + i) * src_width / dest_width; | 1291 FX_DWORD src_x = (clip_left + i) * src_width / dest_width; |
| 1291 if (bFlipX) { | 1292 if (bFlipX) { |
| 1292 src_x = src_width - src_x - 1; | 1293 src_x = src_width - src_x - 1; |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 1321 FX_ARGB argb = m_pPalette[index]; | 1322 FX_ARGB argb = m_pPalette[index]; |
| 1322 dest_scan[dest_pos] = FXARGB_B(argb); | 1323 dest_scan[dest_pos] = FXARGB_B(argb); |
| 1323 dest_scan[dest_pos + 1] = FXARGB_G(argb); | 1324 dest_scan[dest_pos + 1] = FXARGB_G(argb); |
| 1324 dest_scan[dest_pos + 2] = FXARGB_R(argb); | 1325 dest_scan[dest_pos + 2] = FXARGB_R(argb); |
| 1325 } | 1326 } |
| 1326 } | 1327 } |
| 1327 return; | 1328 return; |
| 1328 } else { | 1329 } else { |
| 1329 int last_src_x = -1; | 1330 int last_src_x = -1; |
| 1330 FX_ARGB last_argb; | 1331 FX_ARGB last_argb; |
| 1331 FX_FLOAT orig_Not8Bpp = (FX_FLOAT)m_bpc * (FX_FLOAT)m_nComponents / 8.0f ; | 1332 FX_FLOAT orig_Not8Bpp = (FX_FLOAT)bpc * (FX_FLOAT)m_nComponents / 8.0f; |
| 1332 FX_FLOAT unit_To8Bpc = 255.0f / ((1 << m_bpc) - 1); | 1333 FX_FLOAT unit_To8Bpc = 255.0f / ((1 << bpc) - 1); |
| 1333 for (int i = 0; i < clip_width; i ++) { | 1334 for (int i = 0; i < clip_width; i ++) { |
| 1334 int dest_x = clip_left + i; | 1335 int dest_x = clip_left + i; |
| 1335 FX_DWORD src_x = (bFlipX ? (dest_width - dest_x - 1) : dest_x) * (FX _INT64)src_width / dest_width; | 1336 FX_DWORD src_x = (bFlipX ? (dest_width - dest_x - 1) : dest_x) * (FX _INT64)src_width / dest_width; |
| 1336 src_x %= src_width; | 1337 src_x %= src_width; |
| 1337 FX_LPCBYTE pSrcPixel = NULL; | 1338 FX_LPCBYTE pSrcPixel = NULL; |
| 1338 if (m_bpc % 8 == 0) { | 1339 if (bpc % 8 == 0) { |
| 1339 pSrcPixel = pSrcLine + src_x * orig_Bpp; | 1340 pSrcPixel = pSrcLine + src_x * orig_Bpp; |
| 1340 } else { | 1341 } else { |
| 1341 pSrcPixel = pSrcLine + (int)(src_x * orig_Not8Bpp); | 1342 pSrcPixel = pSrcLine + (int)(src_x * orig_Not8Bpp); |
| 1342 } | 1343 } |
| 1343 FX_LPBYTE pDestPixel = dest_scan + i * dest_Bpp; | 1344 FX_LPBYTE pDestPixel = dest_scan + i * dest_Bpp; |
| 1344 FX_ARGB argb; | 1345 FX_ARGB argb; |
| 1345 if (src_x == last_src_x) { | 1346 if (src_x == last_src_x) { |
| 1346 argb = last_argb; | 1347 argb = last_argb; |
| 1347 } else { | 1348 } else { |
| 1348 if (m_pColorSpace) { | 1349 if (m_pColorSpace) { |
| 1349 FX_BYTE color[4]; | 1350 FX_BYTE color[4]; |
| 1350 if (!m_bDefaultDecode) { | 1351 if (!m_bDefaultDecode) { |
| 1351 for (int i = 0; i < orig_Bpp; i ++) { | 1352 for (int i = 0; i < orig_Bpp; i ++) { |
| 1352 int color_value = (int)((m_pCompData[i].m_DecodeMin + m_pCompData[i].m_DecodeStep * (FX_FLOAT)pSrcPixel[i]) * 255.0f + 0.5f); | 1353 int color_value = (int)((m_pCompData[i].m_DecodeMin + m_pCompData[i].m_DecodeStep * (FX_FLOAT)pSrcPixel[i]) * 255.0f + 0.5f); |
| 1353 temp[i] = color_value > 255 ? 255 : (color_value < 0 ? 0 : color_value); | 1354 temp[i] = color_value > 255 ? 255 : (color_value < 0 ? 0 : color_value); |
| 1354 } | 1355 } |
| 1355 m_pColorSpace->TranslateImageLine(color, temp, 1, 0, 0, m_bLoadMask && m_GroupFamily == PDFCS_DEVICECMYK && m_Family == PDFCS_DEVICECMYK ); | 1356 m_pColorSpace->TranslateImageLine(color, temp, 1, 0, 0, m_bLoadMask && m_GroupFamily == PDFCS_DEVICECMYK && m_Family == PDFCS_DEVICECMYK ); |
| 1356 } else { | 1357 } else { |
| 1357 if (m_bpc < 8) { | 1358 if (bpc < 8) { |
| 1358 int src_bit_pos = 0; | 1359 int src_bit_pos = 0; |
| 1359 if (src_x % 2) { | 1360 if (src_x % 2) { |
| 1360 src_bit_pos = 4; | 1361 src_bit_pos = 4; |
| 1361 } | 1362 } |
| 1362 int value = (1 << m_bpc) - 1; | 1363 int value = (1 << bpc) - 1; |
| 1363 for (FX_DWORD i = 0; i < m_nComponents; i ++) { | 1364 for (FX_DWORD i = 0; i < m_nComponents; i ++) { |
| 1364 temp[i] = (FX_BYTE)(_GetBits8(pSrcPixel, src_bit _pos, m_bpc) * unit_To8Bpc); | 1365 temp[i] = (FX_BYTE)(_GetBits8(pSrcPixel, src_bit _pos, bpc) * unit_To8Bpc); |
| 1365 src_bit_pos += m_bpc; | 1366 src_bit_pos += bpc; |
| 1366 } | 1367 } |
| 1367 m_pColorSpace->TranslateImageLine(color, temp, 1, 0, 0, m_bLoadMask && m_GroupFamily == PDFCS_DEVICECMYK && m_Family == PDFCS_DEVICE CMYK); | 1368 m_pColorSpace->TranslateImageLine(color, temp, 1, 0, 0, m_bLoadMask && m_GroupFamily == PDFCS_DEVICECMYK && m_Family == PDFCS_DEVICE CMYK); |
| 1368 } else { | 1369 } else { |
| 1369 m_pColorSpace->TranslateImageLine(color, pSrcPixel, 1, 0, 0, m_bLoadMask && m_GroupFamily == PDFCS_DEVICECMYK && m_Family == PDFCS_D EVICECMYK); | 1370 m_pColorSpace->TranslateImageLine(color, pSrcPixel, 1, 0, 0, m_bLoadMask && m_GroupFamily == PDFCS_DEVICECMYK && m_Family == PDFCS_D EVICECMYK); |
| 1370 } | 1371 } |
| 1371 } | 1372 } |
| 1372 argb = FXARGB_MAKE(0xff, color[2], color[1], color[0]); | 1373 argb = FXARGB_MAKE(0xff, color[2], color[1], color[0]); |
| 1373 } else { | 1374 } else { |
| 1374 argb = FXARGB_MAKE(0xff, pSrcPixel[2], pSrcPixel[1], pSrcPix el[0]); | 1375 argb = FXARGB_MAKE(0xff, pSrcPixel[2], pSrcPixel[1], pSrcPix el[0]); |
| 1375 } | 1376 } |
| 1376 if (m_bColorKey) { | 1377 if (m_bColorKey) { |
| 1377 int alpha = 0xff; | 1378 int alpha = 0xff; |
| 1378 if (m_nComponents == 3 && m_bpc == 8) { | 1379 if (m_nComponents == 3 && bpc == 8) { |
| 1379 alpha = (pSrcPixel[0] < m_pCompData[0].m_ColorKeyMin || | 1380 alpha = (pSrcPixel[0] < m_pCompData[0].m_ColorKeyMin || |
| 1380 pSrcPixel[0] > m_pCompData[0].m_ColorKeyMax || | 1381 pSrcPixel[0] > m_pCompData[0].m_ColorKeyMax || |
| 1381 pSrcPixel[1] < m_pCompData[1].m_ColorKeyMin || | 1382 pSrcPixel[1] < m_pCompData[1].m_ColorKeyMin || |
| 1382 pSrcPixel[1] > m_pCompData[1].m_ColorKeyMax || | 1383 pSrcPixel[1] > m_pCompData[1].m_ColorKeyMax || |
| 1383 pSrcPixel[2] < m_pCompData[2].m_ColorKeyMin || | 1384 pSrcPixel[2] < m_pCompData[2].m_ColorKeyMin || |
| 1384 pSrcPixel[2] > m_pCompData[2].m_ColorKeyMax) ? 0xff : 0; | 1385 pSrcPixel[2] > m_pCompData[2].m_ColorKeyMax) ? 0xff : 0; |
| 1385 } | 1386 } |
| 1386 argb &= 0xffffff; | 1387 argb &= 0xffffff; |
| 1387 argb |= alpha << 24; | 1388 argb |= alpha << 24; |
| 1388 } | 1389 } |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1507 if (!m_bCached) { | 1508 if (!m_bCached) { |
| 1508 if (m_pBitmap) { | 1509 if (m_pBitmap) { |
| 1509 delete m_pBitmap; | 1510 delete m_pBitmap; |
| 1510 m_pBitmap = NULL; | 1511 m_pBitmap = NULL; |
| 1511 } | 1512 } |
| 1512 if (m_pMask) { | 1513 if (m_pMask) { |
| 1513 delete m_pMask; | 1514 delete m_pMask; |
| 1514 } | 1515 } |
| 1515 } | 1516 } |
| 1516 } | 1517 } |
| OLD | NEW |