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

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

Issue 1405723003: Sanity check the values of TRUE and FALSE. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: address comments Created 5 years, 2 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/dib/fx_dib_convert.cpp ('k') | fpdfsdk/src/fpdfview.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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 glyphRun.glyphCount = glyph_count; 233 glyphRun.glyphCount = glyph_count;
234 glyphRun.glyphIndices = glyph_indices; 234 glyphRun.glyphIndices = glyph_indices;
235 glyphRun.glyphAdvances = glyph_advances; 235 glyphRun.glyphAdvances = glyph_advances;
236 glyphRun.glyphOffsets = (DWRITE_GLYPH_OFFSET*)glyph_offsets; 236 glyphRun.glyphOffsets = (DWRITE_GLYPH_OFFSET*)glyph_offsets;
237 glyphRun.isSideways = FALSE; 237 glyphRun.isSideways = FALSE;
238 glyphRun.bidiLevel = 0; 238 glyphRun.bidiLevel = 0;
239 hr = pTextRenderer->DrawGlyphRun( 239 hr = pTextRenderer->DrawGlyphRun(
240 stringRect, pClipRgn, pMatrix ? &transform : NULL, baselineOriginX, 240 stringRect, pClipRgn, pMatrix ? &transform : NULL, baselineOriginX,
241 baselineOriginY, DWRITE_MEASURING_MODE_NATURAL, &glyphRun, 241 baselineOriginY, DWRITE_MEASURING_MODE_NATURAL, &glyphRun,
242 RGB(FXARGB_R(text_color), FXARGB_G(text_color), FXARGB_B(text_color))); 242 RGB(FXARGB_R(text_color), FXARGB_G(text_color), FXARGB_B(text_color)));
243 return SUCCEEDED(hr) ? TRUE : FALSE; 243 return SUCCEEDED(hr);
244 } 244 }
245 void CDWriteExt::DwDeleteRenderingTarget(void* renderTarget) { 245 void CDWriteExt::DwDeleteRenderingTarget(void* renderTarget) {
246 delete (CDwGdiTextRenderer*)renderTarget; 246 delete (CDwGdiTextRenderer*)renderTarget;
247 } 247 }
248 void CDWriteExt::DwDeleteFont(void* pFont) { 248 void CDWriteExt::DwDeleteFont(void* pFont) {
249 if (pFont) { 249 if (pFont) {
250 SafeRelease((IDWriteFontFace**)&pFont); 250 SafeRelease((IDWriteFontFace**)&pFont);
251 } 251 }
252 } 252 }
253 CDwFontFileStream::CDwFontFileStream(void const* fontFileReferenceKey, 253 CDwFontFileStream::CDwFontFileStream(void const* fontFileReferenceKey,
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 textColor); 398 textColor);
399 if (FAILED(hr)) { 399 if (FAILED(hr)) {
400 return hr; 400 return hr;
401 } 401 }
402 pBitmap_->CompositeBitmap(text_bbox.left, text_bbox.top, text_bbox.Width(), 402 pBitmap_->CompositeBitmap(text_bbox.left, text_bbox.top, text_bbox.Width(),
403 text_bbox.Height(), &dib, text_bbox.left, 403 text_bbox.Height(), &dib, text_bbox.left,
404 text_bbox.top, FXDIB_BLEND_NORMAL, pClipRgn); 404 text_bbox.top, FXDIB_BLEND_NORMAL, pClipRgn);
405 return hr; 405 return hr;
406 } 406 }
407 #endif 407 #endif
OLDNEW
« no previous file with comments | « core/src/fxge/dib/fx_dib_convert.cpp ('k') | fpdfsdk/src/fpdfview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698