From fbf266fc0ea4be2523cbb901a641aa33f0035662 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 10 Jun 2015 11:09:44 -0700 Subject: Remove typdefs for pointer types in fx_system.h. This involves fixing some multiple variable per line declarations, as the textually-substituted "*" applies only to the first one. This involves moving some consts around following the substitution. This involves replacing some typedefs used as constructors with better code. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1171733003 --- core/src/fxge/apple/fx_quartz_device.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/src/fxge/apple/fx_quartz_device.cpp') diff --git a/core/src/fxge/apple/fx_quartz_device.cpp b/core/src/fxge/apple/fx_quartz_device.cpp index 6a97c7baf2..e10f1b5502 100644 --- a/core/src/fxge/apple/fx_quartz_device.cpp +++ b/core/src/fxge/apple/fx_quartz_device.cpp @@ -48,7 +48,7 @@ void CQuartz2D::destroyGraphics(void* graphics) CGContextRelease((CGContextRef) graphics); } } -void* CQuartz2D::CreateFont(FX_LPCBYTE pFontData, FX_DWORD dwFontSize) +void* CQuartz2D::CreateFont(const uint8_t* pFontData, FX_DWORD dwFontSize) { CGDataProviderRef pDataProvider = CGDataProviderCreateWithData(NULL, pFontData, (size_t)dwFontSize, NULL); if (NULL == pDataProvider) { @@ -541,7 +541,7 @@ FX_BOOL CFX_QuartzDeviceDriver::GetDIBits(CFX_DIBitmap* bitmap, CGImageRelease(image); if (bitmap->HasAlpha()) { for (int row = 0; row < bitmap->GetHeight(); row ++) { - FX_LPBYTE pScanline = (FX_LPBYTE)bitmap->GetScanline(row); + uint8_t* pScanline = (uint8_t*)bitmap->GetScanline(row); for (int col = 0; col < bitmap->GetWidth(); col ++) { if (pScanline[3] > 0) { pScanline[0] = (pScanline[0] * 255.f / pScanline[3] + .5f); @@ -654,7 +654,7 @@ FX_BOOL CFX_QuartzDeviceDriver::SetDIBits(const CFX_DIBSource* pBitmap, } } for (int row = 0; row < pBitmap1->GetHeight(); row ++) { - FX_LPBYTE pScanline = (FX_LPBYTE)pBitmap1->GetScanline(row); + uint8_t* pScanline = (uint8_t*)pBitmap1->GetScanline(row); for (int col = 0; col < pBitmap1->GetWidth(); col ++) { pScanline[0] = (uint8_t)(pScanline[0] * pScanline[3] / 255.f + .5f); pScanline[1] = (uint8_t)(pScanline[1] * pScanline[3] / 255.f + .5f); @@ -779,7 +779,7 @@ FX_BOOL CFX_QuartzDeviceDriver::StretchDIBits(const CFX_DIBSource* pBitmap, } } for (int row = 0; row < pBitmap1->GetHeight(); row ++) { - FX_LPBYTE pScanline = (FX_LPBYTE)pBitmap1->GetScanline(row); + uint8_t* pScanline = (uint8_t*)pBitmap1->GetScanline(row); for (int col = 0; col < pBitmap1->GetWidth(); col ++) { pScanline[0] = (uint8_t)(pScanline[0] * pScanline[3] / 255.f + .5f); pScanline[1] = (uint8_t)(pScanline[1] * pScanline[3] / 255.f + .5f); -- cgit v1.2.3