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

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

Issue 294353002: Fix warnings in android build, fix font rendering issue, fix issue 357588: wrong characters represe… (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Patch Set after rebase Created 6 years, 7 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/android/fpf_skiafontmgr.cpp ('k') | core/src/fxge/dib/fx_dib_convert.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_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 "dib_int.h" 9 #include "dib_int.h"
10 const FX_BYTE g_GammaRamp[256] = { 10 const FX_BYTE g_GammaRamp[256] = {
(...skipping 3787 matching lines...) Expand 10 before | Expand all | Expand 10 after
3798 + (src_format & 0x0400 ? 16 : 0) 3798 + (src_format & 0x0400 ? 16 : 0)
3799 + (dest_format & 0x0400 ? 32 : 0) 3799 + (dest_format & 0x0400 ? 32 : 0)
3800 + (pIccTransform ? 64 : 0); 3800 + (pIccTransform ? 64 : 0);
3801 return TRUE; 3801 return TRUE;
3802 } 3802 }
3803 void CFX_ScanlineCompositor::CompositeRgbBitmapLine(FX_LPBYTE dest_scan, FX_LPCB YTE src_scan, int width, FX_LPCBYTE clip_scan, 3803 void CFX_ScanlineCompositor::CompositeRgbBitmapLine(FX_LPBYTE dest_scan, FX_LPCB YTE src_scan, int width, FX_LPCBYTE clip_scan,
3804 FX_LPCBYTE src_extra_alpha, FX_LPBYTE dst_extra_alpha) 3804 FX_LPCBYTE src_extra_alpha, FX_LPBYTE dst_extra_alpha)
3805 { 3805 {
3806 int src_Bpp = (m_SrcFormat & 0xff) >> 3; 3806 int src_Bpp = (m_SrcFormat & 0xff) >> 3;
3807 int dest_Bpp = (m_DestFormat & 0xff) >> 3; 3807 int dest_Bpp = (m_DestFormat & 0xff) >> 3;
3808 int dest_Size = width * dest_Bpp + 4;
3809 if (m_bRgbByteOrder) { 3808 if (m_bRgbByteOrder) {
3810 switch (m_Transparency) { 3809 switch (m_Transparency) {
3811 case 0: 3810 case 0:
3812 case 4: 3811 case 4:
3813 case 8: 3812 case 8:
3814 case 12: 3813 case 12:
3815 _CompositeRow_Argb2Argb_RgbByteOrder(dest_scan, src_scan, width, m_BlendType, clip_scan); 3814 _CompositeRow_Argb2Argb_RgbByteOrder(dest_scan, src_scan, width, m_BlendType, clip_scan);
3816 break; 3815 break;
3817 case 1: 3816 case 1:
3818 _CompositeRow_Rgb2Argb_Blend_NoClip_RgbByteOrder(dest_scan, src_ scan, width, m_BlendType, src_Bpp); 3817 _CompositeRow_Rgb2Argb_Blend_NoClip_RgbByteOrder(dest_scan, src_ scan, width, m_BlendType, src_Bpp);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
3879 _CompositeRow_Rgb2Gray(dest_scan, src_scan, src_Bpp, width, m_Bl endType, clip_scan, m_pIccTransform); 3878 _CompositeRow_Rgb2Gray(dest_scan, src_scan, src_Bpp, width, m_Bl endType, clip_scan, m_pIccTransform);
3880 } 3879 }
3881 } 3880 }
3882 if (m_DestFormat & 0x0400) { 3881 if (m_DestFormat & 0x0400) {
3883 for (int i = 0; i < width; i ++) { 3882 for (int i = 0; i < width; i ++) {
3884 *dest_scan = ~*dest_scan; 3883 *dest_scan = ~*dest_scan;
3885 dest_scan++; 3884 dest_scan++;
3886 } 3885 }
3887 } 3886 }
3888 } else { 3887 } else {
3888 int dest_Size = width * dest_Bpp + 4;
3889 if (dest_Size > m_CacheSize) { 3889 if (dest_Size > m_CacheSize) {
3890 m_pCacheScanline = FX_Realloc(FX_BYTE, m_pCacheScanline, dest_Size); 3890 m_pCacheScanline = FX_Realloc(FX_BYTE, m_pCacheScanline, dest_Size);
3891 if (!m_pCacheScanline) { 3891 if (!m_pCacheScanline) {
3892 return; 3892 return;
3893 } 3893 }
3894 m_CacheSize = dest_Size; 3894 m_CacheSize = dest_Size;
3895 } 3895 }
3896 switch (m_Transparency) { 3896 switch (m_Transparency) {
3897 case 0: 3897 case 0:
3898 case 4: 3898 case 4:
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
4593 } 4593 }
4594 src_alpha_scan = m_pScanlineAlphaV; 4594 src_alpha_scan = m_pScanlineAlphaV;
4595 dest_alpha_scan = dest_alpha_buf; 4595 dest_alpha_scan = dest_alpha_buf;
4596 if (dest_alpha_scan) { 4596 if (dest_alpha_scan) {
4597 for (i = 0; i < m_DestHeight; i ++) { 4597 for (i = 0; i < m_DestHeight; i ++) {
4598 *dest_alpha_scan = *src_alpha_scan++; 4598 *dest_alpha_scan = *src_alpha_scan++;
4599 dest_alpha_scan += y_alpha_step; 4599 dest_alpha_scan += y_alpha_step;
4600 } 4600 }
4601 } 4601 }
4602 } 4602 }
OLDNEW
« no previous file with comments | « core/src/fxge/android/fpf_skiafontmgr.cpp ('k') | core/src/fxge/dib/fx_dib_convert.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698