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

Side by Side Diff: core/fpdfapi/fpdf_render/fpdf_render_image.cpp

Issue 2060973002: Make code compile with clang_use_chrome_plugin (part I) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 6 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 "core/fpdfapi/fpdf_render/render_int.h" 7 #include "core/fpdfapi/fpdf_render/render_int.h"
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 FXDIB_Format CPDF_DIBTransferFunc::GetDestFormat() { 172 FXDIB_Format CPDF_DIBTransferFunc::GetDestFormat() {
173 if (m_pSrc->IsAlphaMask()) { 173 if (m_pSrc->IsAlphaMask()) {
174 return FXDIB_8bppMask; 174 return FXDIB_8bppMask;
175 } 175 }
176 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ 176 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
177 return (m_pSrc->HasAlpha()) ? FXDIB_Argb : FXDIB_Rgb32; 177 return (m_pSrc->HasAlpha()) ? FXDIB_Argb : FXDIB_Rgb32;
178 #else 178 #else
179 return (m_pSrc->HasAlpha()) ? FXDIB_Argb : FXDIB_Rgb; 179 return (m_pSrc->HasAlpha()) ? FXDIB_Argb : FXDIB_Rgb;
180 #endif 180 #endif
181 } 181 }
182
183 FX_ARGB* CPDF_DIBTransferFunc::GetDestPalette() {
184 return nullptr;
185 }
186
182 CPDF_DIBTransferFunc::CPDF_DIBTransferFunc( 187 CPDF_DIBTransferFunc::CPDF_DIBTransferFunc(
183 const CPDF_TransferFunc* pTransferFunc) { 188 const CPDF_TransferFunc* pTransferFunc) {
184 m_RampR = pTransferFunc->m_Samples; 189 m_RampR = pTransferFunc->m_Samples;
185 m_RampG = &pTransferFunc->m_Samples[256]; 190 m_RampG = &pTransferFunc->m_Samples[256];
186 m_RampB = &pTransferFunc->m_Samples[512]; 191 m_RampB = &pTransferFunc->m_Samples[512];
187 } 192 }
188 void CPDF_DIBTransferFunc::TranslateScanline(uint8_t* dest_buf, 193 void CPDF_DIBTransferFunc::TranslateScanline(uint8_t* dest_buf,
189 const uint8_t* src_buf) const { 194 const uint8_t* src_buf) const {
190 int i; 195 int i;
191 FX_BOOL bSkip = FALSE; 196 FX_BOOL bSkip = FALSE;
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 } else if (pFunc) { 1015 } else if (pFunc) {
1011 int size = dest_pitch * height; 1016 int size = dest_pitch * height;
1012 for (int i = 0; i < size; i++) { 1017 for (int i = 0; i < size; i++) {
1013 dest_buf[i] = transfers[src_buf[i]]; 1018 dest_buf[i] = transfers[src_buf[i]];
1014 } 1019 }
1015 } else { 1020 } else {
1016 FXSYS_memcpy(dest_buf, src_buf, dest_pitch * height); 1021 FXSYS_memcpy(dest_buf, src_buf, dest_pitch * height);
1017 } 1022 }
1018 return pMask.release(); 1023 return pMask.release();
1019 } 1024 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_cache.cpp ('k') | core/fpdfapi/fpdf_render/fpdf_render_text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698