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

Side by Side Diff: core/fxge/dib/fx_dib_main.cpp

Issue 2025043002: remove some calls to dib (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
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_image.cpp ('k') | core/fxge/include/fx_ge.h » ('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 "core/fxge/include/fx_dib.h" 7 #include "core/fxge/include/fx_dib.h"
8 8
9 #include <limits.h> 9 #include <limits.h>
10 10
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 } 337 }
338 for (int row = 1; row < m_Height; row++) { 338 for (int row = 1; row < m_Height; row++) {
339 FXSYS_memcpy(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch); 339 FXSYS_memcpy(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch);
340 } 340 }
341 } 341 }
342 break; 342 break;
343 } 343 }
344 case FXDIB_Rgb32: 344 case FXDIB_Rgb32:
345 case FXDIB_Argb: { 345 case FXDIB_Argb: {
346 color = IsCmykImage() ? FXCMYK_TODIB(color) : FXARGB_TODIB(color); 346 color = IsCmykImage() ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
347 #ifdef _SKIA_SUPPORT_
348 if (FXDIB_Rgb32 == GetFormat() && !IsCmykImage()) {
349 color |= 0xFF000000;
350 }
351 #endif
347 for (int i = 0; i < m_Width; i++) { 352 for (int i = 0; i < m_Width; i++) {
348 ((uint32_t*)m_pBuffer)[i] = color; 353 ((uint32_t*)m_pBuffer)[i] = color;
349 } 354 }
350 for (int row = 1; row < m_Height; row++) { 355 for (int row = 1; row < m_Height; row++) {
351 FXSYS_memcpy(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch); 356 FXSYS_memcpy(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch);
352 } 357 }
353 break; 358 break;
354 } 359 }
355 default: 360 default:
356 break; 361 break;
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 uint32_t* pSrcPalette) { 1673 uint32_t* pSrcPalette) {
1669 m_pBitmap.reset(new CFX_DIBitmap); 1674 m_pBitmap.reset(new CFX_DIBitmap);
1670 if (!m_pBitmap->Create(width, height, src_format)) { 1675 if (!m_pBitmap->Create(width, height, src_format)) {
1671 m_pBitmap.reset(); 1676 m_pBitmap.reset();
1672 return FALSE; 1677 return FALSE;
1673 } 1678 }
1674 if (pSrcPalette) 1679 if (pSrcPalette)
1675 m_pBitmap->CopyPalette(pSrcPalette); 1680 m_pBitmap->CopyPalette(pSrcPalette);
1676 return TRUE; 1681 return TRUE;
1677 } 1682 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_image.cpp ('k') | core/fxge/include/fx_ge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698