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

Side by Side Diff: core/src/fxge/ge/fx_ge_device.cpp

Issue 1520063002: Get rid of most instance of 'foo == NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@bstr_isnull
Patch Set: rebase 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
« no previous file with comments | « core/src/fxge/ge/fx_ge.cpp ('k') | core/src/fxge/ge/fx_ge_font.cpp » ('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/include/fxge/fx_ge.h" 7 #include "core/include/fxge/fx_ge.h"
8 8
9 CFX_RenderDevice::CFX_RenderDevice() { 9 CFX_RenderDevice::CFX_RenderDevice() {
10 m_pDeviceDriver = NULL; 10 m_pDeviceDriver = NULL;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 if (FXGETFLAG_COLORTYPE(alpha_flag)) { 123 if (FXGETFLAG_COLORTYPE(alpha_flag)) {
124 fill_alpha = FXGETFLAG_ALPHA_FILL(alpha_flag); 124 fill_alpha = FXGETFLAG_ALPHA_FILL(alpha_flag);
125 stroke_alpha = FXGETFLAG_ALPHA_STROKE(alpha_flag); 125 stroke_alpha = FXGETFLAG_ALPHA_STROKE(alpha_flag);
126 } else { 126 } else {
127 fill_alpha = FXARGB_A(fill_color); 127 fill_alpha = FXARGB_A(fill_color);
128 stroke_alpha = FXARGB_A(stroke_color); 128 stroke_alpha = FXARGB_A(stroke_color);
129 } 129 }
130 if ((fill_mode & 3) == 0) { 130 if ((fill_mode & 3) == 0) {
131 fill_alpha = 0; 131 fill_alpha = 0;
132 } 132 }
133 if (pGraphState == NULL) { 133 if (!pGraphState) {
134 stroke_alpha = 0; 134 stroke_alpha = 0;
135 } 135 }
136 if (stroke_alpha == 0 && pPathData->GetPointCount() == 2) { 136 if (stroke_alpha == 0 && pPathData->GetPointCount() == 2) {
137 FX_PATHPOINT* pPoints = pPathData->GetPoints(); 137 FX_PATHPOINT* pPoints = pPathData->GetPoints();
138 FX_FLOAT x1, x2, y1, y2; 138 FX_FLOAT x1, x2, y1, y2;
139 if (pObject2Device) { 139 if (pObject2Device) {
140 pObject2Device->Transform(pPoints[0].m_PointX, pPoints[0].m_PointY, x1, 140 pObject2Device->Transform(pPoints[0].m_PointX, pPoints[0].m_PointY, x1,
141 y1); 141 y1);
142 pObject2Device->Transform(pPoints[1].m_PointX, pPoints[1].m_PointY, x2, 142 pObject2Device->Transform(pPoints[1].m_PointX, pPoints[1].m_PointY, x2,
143 y2); 143 y2);
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 return m_pDeviceDriver->StartDIBits(pBitmap, bitmap_alpha, argb, pMatrix, 465 return m_pDeviceDriver->StartDIBits(pBitmap, bitmap_alpha, argb, pMatrix,
466 flags, handle, alpha_flag, pIccTransform, 466 flags, handle, alpha_flag, pIccTransform,
467 blend_mode); 467 blend_mode);
468 } 468 }
469 FX_BOOL CFX_RenderDevice::ContinueDIBits(void* handle, IFX_Pause* pPause) { 469 FX_BOOL CFX_RenderDevice::ContinueDIBits(void* handle, IFX_Pause* pPause) {
470 return m_pDeviceDriver->ContinueDIBits(handle, pPause); 470 return m_pDeviceDriver->ContinueDIBits(handle, pPause);
471 } 471 }
472 void CFX_RenderDevice::CancelDIBits(void* handle) { 472 void CFX_RenderDevice::CancelDIBits(void* handle) {
473 m_pDeviceDriver->CancelDIBits(handle); 473 m_pDeviceDriver->CancelDIBits(handle);
474 } 474 }
OLDNEW
« no previous file with comments | « core/src/fxge/ge/fx_ge.cpp ('k') | core/src/fxge/ge/fx_ge_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698