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

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

Issue 1235753006: Merge to XFA: Cleanup: Do not check pointers before deleting them, part 2. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 5 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/src/fxge/win32/fx_win32_device.cpp ('k') | fpdfsdk/src/formfiller/FFL_ComboBox.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 "../../../include/fxge/fx_ge.h" 7 #include "../../../include/fxge/fx_ge.h"
8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ 8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
9 #include "../../../include/fxge/fx_ge_win32.h" 9 #include "../../../include/fxge/fx_ge_win32.h"
10 #include "dwrite_int.h" 10 #include "dwrite_int.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 pMatrix ? &transform : NULL, 259 pMatrix ? &transform : NULL,
260 baselineOriginX, baselineOriginY, 260 baselineOriginX, baselineOriginY,
261 DWRITE_MEASURING_MODE_NATURAL, 261 DWRITE_MEASURING_MODE_NATURAL,
262 &glyphRun, 262 &glyphRun,
263 RGB(FXARGB_R(text_color), FXARGB_G(text_color), FXARGB_B(text_color )) 263 RGB(FXARGB_R(text_color), FXARGB_G(text_color), FXARGB_B(text_color ))
264 ); 264 );
265 return SUCCEEDED(hr) ? TRUE : FALSE; 265 return SUCCEEDED(hr) ? TRUE : FALSE;
266 } 266 }
267 void CDWriteExt::DwDeleteRenderingTarget(void* renderTarget) 267 void CDWriteExt::DwDeleteRenderingTarget(void* renderTarget)
268 { 268 {
269 if (renderTarget) { 269 delete (CDwGdiTextRenderer*)renderTarget;
270 delete (CDwGdiTextRenderer*)renderTarget;
271 }
272 } 270 }
273 void CDWriteExt::DwDeleteFont(void* pFont) 271 void CDWriteExt::DwDeleteFont(void* pFont)
274 { 272 {
275 if (pFont) { 273 if (pFont) {
276 SafeRelease((IDWriteFontFace**)&pFont); 274 SafeRelease((IDWriteFontFace**)&pFont);
277 } 275 }
278 } 276 }
279 CDwFontFileStream::CDwFontFileStream(void const* fontFileReferenceKey, UINT32 fo ntFileReferenceKeySize) 277 CDwFontFileStream::CDwFontFileStream(void const* fontFileReferenceKey, UINT32 fo ntFileReferenceKeySize)
280 { 278 {
281 refCount_ = 0; 279 refCount_ = 0;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 text_bbox.Height(), 469 text_bbox.Height(),
472 &dib, 470 &dib,
473 text_bbox.left, 471 text_bbox.left,
474 text_bbox.top, 472 text_bbox.top,
475 FXDIB_BLEND_NORMAL, 473 FXDIB_BLEND_NORMAL,
476 pClipRgn 474 pClipRgn
477 ); 475 );
478 return hr; 476 return hr;
479 } 477 }
480 #endif 478 #endif
OLDNEW
« no previous file with comments | « core/src/fxge/win32/fx_win32_device.cpp ('k') | fpdfsdk/src/formfiller/FFL_ComboBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698