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

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

Issue 1098583002: Fix a bunch of -Wunused-but-set-variable warnings. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 8 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 FX_BOOL bCmyk = FALSE;
4153 if (src_Bpp > 1) { 4152 if (src_Bpp > 1) {
4154 if (pSrcBitmap->IsCmykImage()) { 4153 if (!pSrcBitmap->IsCmykImage()) {
4155 bCmyk = TRUE;
4156 } else {
4157 bRgb = TRUE; 4154 bRgb = TRUE;
Tom Sepez 2015/04/17 16:20:16 nit: or maybe just ??? FX_BOOL bRgb = src_Bpp
Lei Zhang 2015/05/08 05:40:38 Done.
4158 } 4155 }
4159 } 4156 }
4160 CFX_DIBitmap* pSrcAlphaMask = pSrcBitmap->m_pAlphaMask; 4157 CFX_DIBitmap* pSrcAlphaMask = pSrcBitmap->m_pAlphaMask;
4161 for (int row = 0; row < height; row ++) { 4158 for (int row = 0; row < height; row ++) {
4162 FX_LPBYTE dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * dest_Bpp; 4159 FX_LPBYTE dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * dest_Bpp;
4163 FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * src_Bpp; 4160 FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * src_Bpp;
4164 FX_LPCBYTE src_scan_extra_alpha = pSrcAlphaMask ? pSrcAlphaMask->GetScan line(src_top + row) + src_left : NULL; 4161 FX_LPCBYTE src_scan_extra_alpha = pSrcAlphaMask ? pSrcAlphaMask->GetScan line(src_top + row) + src_left : NULL;
4165 FX_LPBYTE dst_scan_extra_alpha = m_pAlphaMask ? (FX_LPBYTE)m_pAlphaMask- >GetScanline(dest_top + row) + dest_left : NULL; 4162 FX_LPBYTE dst_scan_extra_alpha = m_pAlphaMask ? (FX_LPBYTE)m_pAlphaMask- >GetScanline(dest_top + row) + dest_left : NULL;
4166 FX_LPCBYTE clip_scan = NULL; 4163 FX_LPCBYTE clip_scan = NULL;
4167 if (pClipMask) { 4164 if (pClipMask) {
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
4592 } 4589 }
4593 src_alpha_scan = m_pScanlineAlphaV; 4590 src_alpha_scan = m_pScanlineAlphaV;
4594 dest_alpha_scan = dest_alpha_buf; 4591 dest_alpha_scan = dest_alpha_buf;
4595 if (dest_alpha_scan) { 4592 if (dest_alpha_scan) {
4596 for (i = 0; i < m_DestHeight; i ++) { 4593 for (i = 0; i < m_DestHeight; i ++) {
4597 *dest_alpha_scan = *src_alpha_scan++; 4594 *dest_alpha_scan = *src_alpha_scan++;
4598 dest_alpha_scan += y_alpha_step; 4595 dest_alpha_scan += y_alpha_step;
4599 } 4596 }
4600 } 4597 }
4601 } 4598 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698