| 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 #include "../../../include/fxge/fx_ge.h" | 5 #include "../../../include/fxge/fx_ge.h" |
| 6 //#define _SKIA_SUPPORT_ | 6 //#define _SKIA_SUPPORT_ |
| 7 #if defined(_SKIA_SUPPORT_) | 7 #if defined(_SKIA_SUPPORT_) |
| 8 #include "../../../include/fxcodec/fx_codec.h" | 8 #include "../../../include/fxcodec/fx_codec.h" |
| 9 #include "SkBlitter.h" | 9 #include "SkBlitter.h" |
| 10 #include "fx_skia_blitter_new.h" | 10 #include "fx_skia_blitter_new.h" |
| (...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1379 if (!pIccTransform) | 1379 if (!pIccTransform) |
| 1380 return FALSE; | 1380 return FALSE; |
| 1381 color = FXARGB_TODIB(color); | 1381 color = FXARGB_TODIB(color); |
| 1382 pIccModule->TranslateScanline(pIccTransf
orm, (uint8_t*)&m_Color, (const uint8_t*)&color, 1); | 1382 pIccModule->TranslateScanline(pIccTransf
orm, (uint8_t*)&m_Color, (const uint8_t*)&color, 1); |
| 1383 } | 1383 } |
| 1384 m_Red = ((uint8_t*)&m_Color)[0]; | 1384 m_Red = ((uint8_t*)&m_Color)[0]; |
| 1385 m_Green = ((uint8_t*)&m_Color)[1]; | 1385 m_Green = ((uint8_t*)&m_Color)[1]; |
| 1386 m_Blue = ((uint8_t*)&m_Color)[2]; | 1386 m_Blue = ((uint8_t*)&m_Color)[2]; |
| 1387 m_Gray = ((uint8_t*)&m_Color)[3]; | 1387 m_Gray = ((uint8_t*)&m_Color)[3]; |
| 1388 return TRUE; | 1388 return TRUE; |
| 1389 » » » } else { | 1389 » » » } |
| 1390 » » » » if (pIccTransform) { | 1390 if (pIccTransform) { |
| 1391 » » » » » color = bObjectCMYK ? FXCMYK_TODIB(color
) : FXARGB_TODIB(color); | 1391 color = bObjectCMYK ? FXCMYK_TODIB(color) : FXARGB_TODIB(color); |
| 1392 » » » » » pIccModule->TranslateScanline(pIccTransf
orm, (uint8_t*)&m_Color, (const uint8_t*)&color, 1); | 1392 pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color,
(const uint8_t*)&color, 1); |
| 1393 » » » » » ((uint8_t*)&m_Color)[3] = m_Alpha; | 1393 ((uint8_t*)&m_Color)[3] = m_Alpha; |
| 1394 » » » » » m_Red = ((uint8_t*)&m_Color)[2]; | 1394 m_Red = ((uint8_t*)&m_Color)[2]; |
| 1395 » » » » » m_Green = ((uint8_t*)&m_Color)[1]; | 1395 m_Green = ((uint8_t*)&m_Color)[1]; |
| 1396 » » » » » m_Blue = ((uint8_t*)&m_Color)[0]; | 1396 m_Blue = ((uint8_t*)&m_Color)[0]; |
| 1397 » » » » » // Need Johnson to improvement it. | 1397 // Need Johnson to improvement it. |
| 1398 » » » » » if (m_bRgbByteOrder) { | 1398 if (m_bRgbByteOrder) { |
| 1399 » » » » » » // swap | 1399 // swap |
| 1400 » » » » » » m_Red = ((uint8_t*)&m_Color)[0]; | 1400 m_Red = ((uint8_t*)&m_Color)[0]; |
| 1401 » » » » » » m_Blue = ((uint8_t*)&m_Color)[2]
; | 1401 m_Blue = ((uint8_t*)&m_Color)[2]; |
| 1402 » » » » » » m_Color = FXARGB_TODIB(m_Color); | 1402 m_Color = FXARGB_TODIB(m_Color); |
| 1403 » » » » » » m_Color = FXARGB_TOBGRORDERDIB(m
_Color); | 1403 m_Color = FXARGB_TOBGRORDERDIB(m_Color); |
| 1404 » » » » » } | 1404 } |
| 1405 » » » » } else { | 1405 } else { |
| 1406 » » » » » if (bObjectCMYK) { | 1406 if (bObjectCMYK) { |
| 1407 » » » » » » uint8_t r, g, b; | 1407 uint8_t r, g, b; |
| 1408 » » » » » » AdobeCMYK_to_sRGB1(FXSYS_GetCVal
ue(color), FXSYS_GetMValue(color), FXSYS_GetYValue(color), FXSYS_GetKValue(color
), | 1408 AdobeCMYK_to_sRGB1(FXSYS_GetCValue(color), FXSYS_GetMValue(c
olor), FXSYS_GetYValue(color), FXSYS_GetKValue(color), |
| 1409 » » » » » » » r, g, b); | 1409 r, g, b); |
| 1410 » » » » » » m_Color = FXARGB_MAKE(m_Alpha, r
, g, b); | 1410 m_Color = FXARGB_MAKE(m_Alpha, r, g, b); |
| 1411 » » » » » » if (m_bRgbByteOrder){ | 1411 if (m_bRgbByteOrder){ |
| 1412 » » » » » » » m_Color = FXARGB_TOBGROR
DERDIB(m_Color); | 1412 m_Color = FXARGB_TOBGRORDERDIB(m_Color); |
| 1413 » » » » » » » m_Red = b; m_Green = g;
m_Blue = r;// | 1413 m_Red = b; m_Green = g; m_Blue = r;// |
| 1414 » » » » » » }else { | 1414 }else { |
| 1415 » » » » » » » m_Color = FXARGB_TODIB(m
_Color); | 1415 m_Color = FXARGB_TODIB(m_Color); |
| 1416 » » » » » » » m_Red = r; m_Green = g;
m_Blue = b;// | 1416 m_Red = r; m_Green = g; m_Blue = b;// |
| 1417 » » » » » » } | 1417 } |
| 1418 » » » » » } else { | 1418 } else { |
| 1419 » » » » » » if (m_bRgbByteOrder){ | 1419 if (m_bRgbByteOrder){ |
| 1420 » » » » » » » m_Color = FXARGB_TOBGROR
DERDIB(color); | 1420 m_Color = FXARGB_TOBGRORDERDIB(color); |
| 1421 » » » » » » » ArgbDecode(color, m_Alph
a, m_Blue, m_Green, m_Red); // | 1421 ArgbDecode(color, m_Alpha, m_Blue, m_Green, m_Red); // |
| 1422 » » » » » » }else { | 1422 }else { |
| 1423 » » » » » » » m_Color = FXARGB_TODIB(c
olor); | 1423 m_Color = FXARGB_TODIB(color); |
| 1424 » » » » » » » ArgbDecode(color, m_Alph
a, m_Red, m_Green, m_Blue); | 1424 ArgbDecode(color, m_Alpha, m_Red, m_Green, m_Blue); |
| 1425 » » » » » » } | 1425 } |
| 1426 » » » » » } | 1426 } |
| 1427 » » » » } | |
| 1428 } | 1427 } |
| 1429 } | 1428 } |
| 1430 // Get palette transparency selector | 1429 // Get palette transparency selector |
| 1431 m_ProcessFilter = (m_pOriDevice? 1 : 0) /* has Ori Device flag *
/ | 1430 m_ProcessFilter = (m_pOriDevice? 1 : 0) /* has Ori Device flag *
/ |
| 1432 + (m_pDevice->GetBPP() >= 8 ? 2
: 0) /* bpp flag */ | 1431 + (m_pDevice->GetBPP() >= 8 ? 2
: 0) /* bpp flag */ |
| 1433 + (m_pClipMask? 4 : 0)
/* has clip region flag */ | 1432 + (m_pClipMask? 4 : 0)
/* has clip region flag */ |
| 1434 + (m_pDevice->m_pAlphaMask? 8 :
0); /* has Alpha Mask chanel flag */ | 1433 + (m_pDevice->m_pAlphaMask? 8 :
0); /* has Alpha Mask chanel flag */ |
| 1435 switch(m_ProcessFilter) { | 1434 switch(m_ProcessFilter) { |
| 1436 case 0: | 1435 case 0: |
| 1437 composite_span = &CFX_SkiaRenderer::CompositeSpa
n1bpp_0; | 1436 composite_span = &CFX_SkiaRenderer::CompositeSpa
n1bpp_0; |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 m_pDevice = pDevice; | 1600 m_pDevice = pDevice; |
| 1602 m_Left = Left; | 1601 m_Left = Left; |
| 1603 m_Top = Top; | 1602 m_Top = Top; |
| 1604 if (pDevice){ | 1603 if (pDevice){ |
| 1605 m_dstWidth = m_Left + pDevice->GetWidth(); | 1604 m_dstWidth = m_Left + pDevice->GetWidth(); |
| 1606 m_dstHeight = m_Top + pDevice->GetHeight(); | 1605 m_dstHeight = m_Top + pDevice->GetHeight(); |
| 1607 } | 1606 } |
| 1608 return TRUE; | 1607 return TRUE; |
| 1609 } | 1608 } |
| 1610 #endif | 1609 #endif |
| OLD | NEW |