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

Unified Diff: core/src/fxge/win32/fx_win32_dwrite.cpp

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxge/win32/fx_win32_dib.cpp ('k') | core/src/fxge/win32/fx_win32_gdipext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/win32/fx_win32_dwrite.cpp
diff --git a/core/src/fxge/win32/fx_win32_dwrite.cpp b/core/src/fxge/win32/fx_win32_dwrite.cpp
index 889a5684b703865c23c2e9db6a8025ff3f1fa847..ef84588a17f1803e69900eddaaeed221553b32d4 100644
--- a/core/src/fxge/win32/fx_win32_dwrite.cpp
+++ b/core/src/fxge/win32/fx_win32_dwrite.cpp
@@ -133,7 +133,7 @@ LPVOID CDWriteExt::DwCreateFontFaceFromStream(uint8_t* pData, FX_DWORD size, int
IDWriteFactory* pDwFactory = (IDWriteFactory*)m_pDWriteFactory;
IDWriteFontFile* pDwFontFile = NULL;
IDWriteFontFace* pDwFontFace = NULL;
- BOOL isSupportedFontType = FALSE;
+ BOOL isSupportedFontType = false;
DWRITE_FONT_FILE_TYPE fontFileType;
DWRITE_FONT_FACE_TYPE fontFaceType;
UINT32 numberOfFaces;
@@ -174,10 +174,10 @@ failed:
SafeRelease(&pDwFontFile);
return NULL;
}
-FX_BOOL CDWriteExt::DwCreateRenderingTarget(CFX_DIBitmap* pBitmap, void** renderTarget)
+bool CDWriteExt::DwCreateRenderingTarget(CFX_DIBitmap* pBitmap, void** renderTarget)
{
if (pBitmap->GetFormat() > FXDIB_Argb) {
- return FALSE;
+ return false;
}
IDWriteFactory* pDwFactory = (IDWriteFactory*)m_pDWriteFactory;
IDWriteGdiInterop* pGdiInterop = NULL;
@@ -212,14 +212,14 @@ FX_BOOL CDWriteExt::DwCreateRenderingTarget(CFX_DIBitmap* pBitmap, void** render
SafeRelease(&pGdiInterop);
SafeRelease(&pBitmapRenderTarget);
SafeRelease(&pRenderingParams);
- return TRUE;
+ return true;
failed:
SafeRelease(&pGdiInterop);
SafeRelease(&pBitmapRenderTarget);
SafeRelease(&pRenderingParams);
- return FALSE;
+ return false;
}
-FX_BOOL CDWriteExt::DwRendingString(void* renderTarget, CFX_ClipRgn* pClipRgn, FX_RECT& stringRect, CFX_AffineMatrix* pMatrix,
+bool CDWriteExt::DwRendingString(void* renderTarget, CFX_ClipRgn* pClipRgn, FX_RECT& stringRect, CFX_AffineMatrix* pMatrix,
void *font, FX_FLOAT font_size, FX_ARGB text_color,
int glyph_count, unsigned short* glyph_indices,
FX_FLOAT baselineOriginX, FX_FLOAT baselineOriginY,
@@ -227,7 +227,7 @@ FX_BOOL CDWriteExt::DwRendingString(void* renderTarget, CFX_ClipRgn* pClipRgn, F
FX_FLOAT* glyph_advances)
{
if (renderTarget == NULL) {
- return TRUE;
+ return true;
}
CDwGdiTextRenderer* pTextRenderer = (CDwGdiTextRenderer*)renderTarget;
DWRITE_MATRIX transform;
@@ -247,7 +247,7 @@ FX_BOOL CDWriteExt::DwRendingString(void* renderTarget, CFX_ClipRgn* pClipRgn, F
glyphRun.glyphIndices = glyph_indices;
glyphRun.glyphAdvances = glyph_advances;
glyphRun.glyphOffsets = (DWRITE_GLYPH_OFFSET*)glyph_offsets;
- glyphRun.isSideways = FALSE;
+ glyphRun.isSideways = false;
glyphRun.bidiLevel = 0;
hr = pTextRenderer->DrawGlyphRun(
stringRect,
@@ -258,7 +258,7 @@ FX_BOOL CDWriteExt::DwRendingString(void* renderTarget, CFX_ClipRgn* pClipRgn, F
&glyphRun,
RGB(FXARGB_R(text_color), FXARGB_G(text_color), FXARGB_B(text_color))
);
- return SUCCEEDED(hr) ? TRUE : FALSE;
+ return SUCCEEDED(hr) ? true : false;
}
void CDWriteExt::DwDeleteRenderingTarget(void* renderTarget)
{
« no previous file with comments | « core/src/fxge/win32/fx_win32_dib.cpp ('k') | core/src/fxge/win32/fx_win32_gdipext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698