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

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

Issue 818363006: fix a few linux compilation warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Restore origina cmslut.c Created 5 years, 11 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
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 4131 matching lines...) Expand 10 before | Expand all | Expand 10 after
4142 clip_box = pClipRgn->GetBox(); 4142 clip_box = pClipRgn->GetBox();
4143 } 4143 }
4144 CFX_ScanlineCompositor compositor; 4144 CFX_ScanlineCompositor compositor;
4145 if (!compositor.Init(GetFormat(), pSrcBitmap->GetFormat(), width, pSrcBitmap ->GetPalette(), 0, blend_type, 4145 if (!compositor.Init(GetFormat(), pSrcBitmap->GetFormat(), width, pSrcBitmap ->GetPalette(), 0, blend_type,
4146 pClipMask != NULL, bRgbByteOrder, 0, pIccTransform)) { 4146 pClipMask != NULL, bRgbByteOrder, 0, pIccTransform)) {
4147 return FALSE; 4147 return FALSE;
4148 } 4148 }
4149 int dest_Bpp = m_bpp / 8; 4149 int dest_Bpp = m_bpp / 8;
4150 int src_Bpp = pSrcBitmap->GetBPP() / 8; 4150 int src_Bpp = pSrcBitmap->GetBPP() / 8;
4151 FX_BOOL bRgb = FALSE; 4151 FX_BOOL bRgb = FALSE;
4152 // TODO(tsepez): Unused bCymk warning here is troubling. Is CMYK supported p roperly?
4152 FX_BOOL bCmyk = FALSE; 4153 FX_BOOL bCmyk = FALSE;
jun_fang 2015/01/17 00:39:17 One of bRgb and bCmyk is duplicated. Suggest to re
4153 if (src_Bpp > 1) { 4154 if (src_Bpp > 1) {
4154 if (pSrcBitmap->IsCmykImage()) { 4155 if (pSrcBitmap->IsCmykImage()) {
4155 bCmyk = TRUE; 4156 bCmyk = TRUE;
4156 } else { 4157 } else {
4157 bRgb = TRUE; 4158 bRgb = TRUE;
4158 } 4159 }
4159 } 4160 }
4160 CFX_DIBitmap* pSrcAlphaMask = pSrcBitmap->m_pAlphaMask; 4161 CFX_DIBitmap* pSrcAlphaMask = pSrcBitmap->m_pAlphaMask;
4161 for (int row = 0; row < height; row ++) { 4162 for (int row = 0; row < height; row ++) {
4162 FX_LPBYTE dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * dest_Bpp; 4163 FX_LPBYTE dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * dest_Bpp;
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
4592 } 4593 }
4593 src_alpha_scan = m_pScanlineAlphaV; 4594 src_alpha_scan = m_pScanlineAlphaV;
4594 dest_alpha_scan = dest_alpha_buf; 4595 dest_alpha_scan = dest_alpha_buf;
4595 if (dest_alpha_scan) { 4596 if (dest_alpha_scan) {
4596 for (i = 0; i < m_DestHeight; i ++) { 4597 for (i = 0; i < m_DestHeight; i ++) {
4597 *dest_alpha_scan = *src_alpha_scan++; 4598 *dest_alpha_scan = *src_alpha_scan++;
4598 dest_alpha_scan += y_alpha_step; 4599 dest_alpha_scan += y_alpha_step;
4599 } 4600 }
4600 } 4601 }
4601 } 4602 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698