Chromium Code Reviews| Index: core/fxge/apple/fx_apple_platform.cpp |
| diff --git a/core/fxge/apple/fx_apple_platform.cpp b/core/fxge/apple/fx_apple_platform.cpp |
| index a641ad5f85d44804addb9f754cb14a1a7d7f51e6..48f2e5dad3a1c88c0397b54ea1540d0904cfe1ce 100644 |
| --- a/core/fxge/apple/fx_apple_platform.cpp |
| +++ b/core/fxge/apple/fx_apple_platform.cpp |
| @@ -31,7 +31,7 @@ void CFX_AggDeviceDriver::DestroyPlatform() { |
| ->m_quartz2d; |
| if (m_pPlatformGraphics) { |
| quartz2d.destroyGraphics(m_pPlatformGraphics); |
| - m_pPlatformGraphics = NULL; |
| + m_pPlatformGraphics = nullptr; |
| } |
| } |
| void CFX_FaceCache::InitPlatform() {} |
| @@ -42,7 +42,7 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph_Nativetext( |
| const CFX_Matrix* pMatrix, |
| int dest_width, |
| int anti_alias) { |
| - return NULL; |
| + return nullptr; |
| } |
| static FX_BOOL _CGDrawGlyphRun(CGContextRef pContext, |
| int nChars, |
| @@ -100,7 +100,7 @@ static FX_BOOL _CGDrawGlyphRun(CGContextRef pContext, |
| quartz2d.setGraphicsTextMatrix(pContext, &new_matrix); |
| return quartz2d.drawGraphicsString(pContext, pFont->GetPlatformFont(), |
| font_size, glyph_indices, glyph_positions, |
| - nChars, argb, NULL); |
| + nChars, argb, nullptr); |
| } |
| static void _DoNothing(void* info, const void* data, size_t size) {} |
| FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars, |
| @@ -127,13 +127,13 @@ FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars, |
| } |
| } |
| CGContextRef ctx = CGContextRef(m_pPlatformGraphics); |
| - if (NULL == ctx) { |
| + if (nullptr == ctx) { |
|
Tom Sepez
2016/06/02 20:09:49
nit: !ctx
Lei Zhang
2016/06/07 07:33:24
Done.
|
| return FALSE; |
| } |
| CGContextSaveGState(ctx); |
| CGContextSetTextDrawingMode(ctx, kCGTextFillClip); |
| CGRect rect_cg; |
| - CGImageRef pImageCG = NULL; |
| + CGImageRef pImageCG = nullptr; |
| if (m_pClipRgn) { |
| rect_cg = |
| CGRectMake(m_pClipRgn->GetBox().left, m_pClipRgn->GetBox().top, |
| @@ -141,7 +141,7 @@ FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars, |
| const CFX_DIBitmap* pClipMask = m_pClipRgn->GetMask(); |
| if (pClipMask) { |
| CGDataProviderRef pClipMaskDataProvider = CGDataProviderCreateWithData( |
| - NULL, pClipMask->GetBuffer(), |
| + nullptr, pClipMask->GetBuffer(), |
| pClipMask->GetPitch() * pClipMask->GetHeight(), _DoNothing); |
| CGFloat decode_f[2] = {255.f, 0.f}; |
| pImageCG = CGImageMaskCreate( |
| @@ -173,7 +173,7 @@ void CFX_Font::ReleasePlatformResource() { |
| static_cast<CApplePlatform*>(CFX_GEModule::Get()->GetPlatformData()) |
| ->m_quartz2d; |
| quartz2d.DestroyFont(m_pPlatformFont); |
| - m_pPlatformFont = NULL; |
| + m_pPlatformFont = nullptr; |
| } |
| } |