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

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

Issue 2045083003: Remove implicit CFX_CountedRef::operator T*() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix mac build. 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 return TRUE; 358 return TRUE;
359 } 359 }
360 } 360 }
361 return FALSE; 361 return FALSE;
362 } 362 }
363 FX_BOOL CPDF_ImageRenderer::StartRenderDIBSource() { 363 FX_BOOL CPDF_ImageRenderer::StartRenderDIBSource() {
364 if (!m_Loader.m_pBitmap) { 364 if (!m_Loader.m_pBitmap) {
365 return FALSE; 365 return FALSE;
366 } 366 }
367 m_BitmapAlpha = 255; 367 m_BitmapAlpha = 255;
368 const CPDF_GeneralStateData* pGeneralState = m_pImageObject->m_GeneralState; 368 const CPDF_GeneralStateData* pGeneralState =
369 m_pImageObject->m_GeneralState.GetObject();
369 if (pGeneralState) { 370 if (pGeneralState) {
370 m_BitmapAlpha = FXSYS_round(pGeneralState->m_FillAlpha * 255); 371 m_BitmapAlpha = FXSYS_round(pGeneralState->m_FillAlpha * 255);
371 } 372 }
372 m_pDIBSource = m_Loader.m_pBitmap; 373 m_pDIBSource = m_Loader.m_pBitmap;
373 if (m_pRenderStatus->m_Options.m_ColorMode == RENDER_COLOR_ALPHA && 374 if (m_pRenderStatus->m_Options.m_ColorMode == RENDER_COLOR_ALPHA &&
374 !m_Loader.m_pMask) { 375 !m_Loader.m_pMask) {
375 return StartBitmapAlpha(); 376 return StartBitmapAlpha();
376 } 377 }
377 if (pGeneralState && pGeneralState->m_pTR) { 378 if (pGeneralState && pGeneralState->m_pTR) {
378 if (!pGeneralState->m_pTransferFunc) { 379 if (!pGeneralState->m_pTransferFunc) {
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 } else if (pFunc) { 1010 } else if (pFunc) {
1010 int size = dest_pitch * height; 1011 int size = dest_pitch * height;
1011 for (int i = 0; i < size; i++) { 1012 for (int i = 0; i < size; i++) {
1012 dest_buf[i] = transfers[src_buf[i]]; 1013 dest_buf[i] = transfers[src_buf[i]];
1013 } 1014 }
1014 } else { 1015 } else {
1015 FXSYS_memcpy(dest_buf, src_buf, dest_pitch * height); 1016 FXSYS_memcpy(dest_buf, src_buf, dest_pitch * height);
1016 } 1017 }
1017 return pMask.release(); 1018 return pMask.release();
1018 } 1019 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698