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

Side by Side Diff: core/src/fxge/win32/fx_win32_print.cpp

Issue 1529553003: Merge to XFA: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years 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/include/fxge/fx_ge.h" 7 #include "core/include/fxge/fx_ge.h"
8 8
9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ 9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 int alpha_flag, 42 int alpha_flag,
43 void* pIccTransform) { 43 void* pIccTransform) {
44 if (pSource->IsAlphaMask()) { 44 if (pSource->IsAlphaMask()) {
45 FX_RECT clip_rect(left, top, left + pSrcRect->Width(), 45 FX_RECT clip_rect(left, top, left + pSrcRect->Width(),
46 top + pSrcRect->Height()); 46 top + pSrcRect->Height());
47 return StretchDIBits(pSource, color, left - pSrcRect->left, 47 return StretchDIBits(pSource, color, left - pSrcRect->left,
48 top - pSrcRect->top, pSource->GetWidth(), 48 top - pSrcRect->top, pSource->GetWidth(),
49 pSource->GetHeight(), &clip_rect, 0, alpha_flag, 49 pSource->GetHeight(), &clip_rect, 0, alpha_flag,
50 pIccTransform, FXDIB_BLEND_NORMAL); 50 pIccTransform, FXDIB_BLEND_NORMAL);
51 } 51 }
52 ASSERT(pSource != NULL && !pSource->IsAlphaMask() && pSrcRect != NULL); 52 ASSERT(pSource && !pSource->IsAlphaMask() && pSrcRect);
53 ASSERT(blend_type == FXDIB_BLEND_NORMAL); 53 ASSERT(blend_type == FXDIB_BLEND_NORMAL);
54 if (pSource->HasAlpha()) { 54 if (pSource->HasAlpha()) {
55 return FALSE; 55 return FALSE;
56 } 56 }
57 CFX_DIBExtractor temp(pSource); 57 CFX_DIBExtractor temp(pSource);
58 CFX_DIBitmap* pBitmap = temp; 58 CFX_DIBitmap* pBitmap = temp;
59 if (pBitmap == NULL) { 59 if (pBitmap == NULL) {
60 return FALSE; 60 return FALSE;
61 } 61 }
62 return GDI_SetDIBits(pBitmap, pSrcRect, left, top, pIccTransform); 62 return GDI_SetDIBits(pBitmap, pSrcRect, left, top, pIccTransform);
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 CFX_FontCache* pCache, 465 CFX_FontCache* pCache,
466 const CFX_Matrix* pObject2Device, 466 const CFX_Matrix* pObject2Device,
467 FX_FLOAT font_size, 467 FX_FLOAT font_size,
468 FX_DWORD color, 468 FX_DWORD color,
469 int alpha_flag, 469 int alpha_flag,
470 void* pIccTransform) { 470 void* pIccTransform) {
471 return m_PSRenderer.DrawText(nChars, pCharPos, pFont, pCache, pObject2Device, 471 return m_PSRenderer.DrawText(nChars, pCharPos, pFont, pCache, pObject2Device,
472 font_size, color, alpha_flag, pIccTransform); 472 font_size, color, alpha_flag, pIccTransform);
473 } 473 }
474 #endif 474 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698