| 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 "render_int.h" | 7 #include "render_int.h" | 
| 8 | 8 | 
| 9 #include <utility> | 9 #include <utility> | 
| 10 #include <vector> | 10 #include <vector> | 
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 515     return TRUE; | 515     return TRUE; | 
| 516   } | 516   } | 
| 517   bitmap_device1.GetBitmap()->Clear(0xffffff); | 517   bitmap_device1.GetBitmap()->Clear(0xffffff); | 
| 518   { | 518   { | 
| 519     CPDF_RenderStatus bitmap_render; | 519     CPDF_RenderStatus bitmap_render; | 
| 520     bitmap_render.Initialize(m_pRenderStatus->m_pContext, &bitmap_device1, NULL, | 520     bitmap_render.Initialize(m_pRenderStatus->m_pContext, &bitmap_device1, NULL, | 
| 521                              NULL, NULL, NULL, &m_pRenderStatus->m_Options, 0, | 521                              NULL, NULL, NULL, &m_pRenderStatus->m_Options, 0, | 
| 522                              m_pRenderStatus->m_bDropObjects, NULL, TRUE); | 522                              m_pRenderStatus->m_bDropObjects, NULL, TRUE); | 
| 523     CFX_Matrix patternDevice = *pObj2Device; | 523     CFX_Matrix patternDevice = *pObj2Device; | 
| 524     patternDevice.Translate((FX_FLOAT)-rect.left, (FX_FLOAT)-rect.top); | 524     patternDevice.Translate((FX_FLOAT)-rect.left, (FX_FLOAT)-rect.top); | 
| 525     if (m_pPattern->m_PatternType == PATTERN_TILING) { | 525     if (m_pPattern->m_PatternType == CPDF_Pattern::TILING) { | 
| 526       bitmap_render.DrawTilingPattern((CPDF_TilingPattern*)m_pPattern, | 526       bitmap_render.DrawTilingPattern( | 
| 527                                       m_pImageObject, &patternDevice, FALSE); | 527           static_cast<CPDF_TilingPattern*>(m_pPattern), m_pImageObject, | 
|  | 528           &patternDevice, FALSE); | 
| 528     } else { | 529     } else { | 
| 529       bitmap_render.DrawShadingPattern((CPDF_ShadingPattern*)m_pPattern, | 530       bitmap_render.DrawShadingPattern( | 
| 530                                        m_pImageObject, &patternDevice, FALSE); | 531           static_cast<CPDF_ShadingPattern*>(m_pPattern), m_pImageObject, | 
|  | 532           &patternDevice, FALSE); | 
| 531     } | 533     } | 
| 532   } | 534   } | 
| 533   { | 535   { | 
| 534     CFX_FxgeDevice bitmap_device2; | 536     CFX_FxgeDevice bitmap_device2; | 
| 535     if (!bitmap_device2.Create(rect.Width(), rect.Height(), FXDIB_8bppRgb)) { | 537     if (!bitmap_device2.Create(rect.Width(), rect.Height(), FXDIB_8bppRgb)) { | 
| 536       return TRUE; | 538       return TRUE; | 
| 537     } | 539     } | 
| 538     bitmap_device2.GetBitmap()->Clear(0); | 540     bitmap_device2.GetBitmap()->Clear(0); | 
| 539     CPDF_RenderStatus bitmap_render; | 541     CPDF_RenderStatus bitmap_render; | 
| 540     bitmap_render.Initialize(m_pRenderStatus->m_pContext, &bitmap_device2, NULL, | 542     bitmap_render.Initialize(m_pRenderStatus->m_pContext, &bitmap_device2, NULL, | 
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 982   } else if (pFunc) { | 984   } else if (pFunc) { | 
| 983     int size = dest_pitch * height; | 985     int size = dest_pitch * height; | 
| 984     for (int i = 0; i < size; i++) { | 986     for (int i = 0; i < size; i++) { | 
| 985       dest_buf[i] = transfers[src_buf[i]]; | 987       dest_buf[i] = transfers[src_buf[i]]; | 
| 986     } | 988     } | 
| 987   } else { | 989   } else { | 
| 988     FXSYS_memcpy(dest_buf, src_buf, dest_pitch * height); | 990     FXSYS_memcpy(dest_buf, src_buf, dest_pitch * height); | 
| 989   } | 991   } | 
| 990   return pMask.release(); | 992   return pMask.release(); | 
| 991 } | 993 } | 
| OLD | NEW | 
|---|