From 0c327657fb8c23934c5beae520e7a97a48e2eef6 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 25 Oct 2018 19:02:50 +0000 Subject: Change FXDIB_BLEND_FOO typedefs to an enum class. BUG=pdfium:1085 Change-Id: Ieb43d4588e1d689e327e428dcbbf7adba45ce178 Reviewed-on: https://pdfium-review.googlesource.com/c/44545 Commit-Queue: Lei Zhang Reviewed-by: Tom Sepez --- core/fxge/cfx_renderdevice.h | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'core/fxge/cfx_renderdevice.h') diff --git a/core/fxge/cfx_renderdevice.h b/core/fxge/cfx_renderdevice.h index f0d78989be..d18161627f 100644 --- a/core/fxge/cfx_renderdevice.h +++ b/core/fxge/cfx_renderdevice.h @@ -138,7 +138,7 @@ class CFX_RenderDevice { uint32_t stroke_color, int fill_mode) { return DrawPathWithBlend(pPathData, pObject2Device, pGraphState, fill_color, - stroke_color, fill_mode, FXDIB_BLEND_NORMAL); + stroke_color, fill_mode, BlendMode::kNormal); } bool DrawPathWithBlend(const CFX_PathData* pPathData, const CFX_Matrix* pObject2Device, @@ -146,27 +146,27 @@ class CFX_RenderDevice { uint32_t fill_color, uint32_t stroke_color, int fill_mode, - int blend_type); + BlendMode blend_type); bool FillRect(const FX_RECT& rect, uint32_t color) { - return FillRectWithBlend(rect, color, FXDIB_BLEND_NORMAL); + return FillRectWithBlend(rect, color, BlendMode::kNormal); } RetainPtr GetBackDrop(); bool GetDIBits(const RetainPtr& pBitmap, int left, int top); bool SetDIBits(const RetainPtr& pBitmap, int left, int top) { - return SetDIBitsWithBlend(pBitmap, left, top, FXDIB_BLEND_NORMAL); + return SetDIBitsWithBlend(pBitmap, left, top, BlendMode::kNormal); } bool SetDIBitsWithBlend(const RetainPtr& pBitmap, int left, int top, - int blend_type); + BlendMode blend_type); bool StretchDIBits(const RetainPtr& pBitmap, int left, int top, int dest_width, int dest_height) { return StretchDIBitsWithFlagsAndBlend(pBitmap, left, top, dest_width, - dest_height, 0, FXDIB_BLEND_NORMAL); + dest_height, 0, BlendMode::kNormal); } bool StretchDIBitsWithFlagsAndBlend(const RetainPtr& pBitmap, int left, @@ -174,7 +174,7 @@ class CFX_RenderDevice { int dest_width, int dest_height, uint32_t flags, - int blend_type); + BlendMode blend_type); bool SetBitMask(const RetainPtr& pBitmap, int left, int top, @@ -199,7 +199,7 @@ class CFX_RenderDevice { uint32_t flags, std::unique_ptr* handle) { return StartDIBitsWithBlend(pBitmap, bitmap_alpha, color, pMatrix, flags, - handle, FXDIB_BLEND_NORMAL); + handle, BlendMode::kNormal); } bool StartDIBitsWithBlend(const RetainPtr& pBitmap, int bitmap_alpha, @@ -207,7 +207,7 @@ class CFX_RenderDevice { const CFX_Matrix* pMatrix, uint32_t flags, std::unique_ptr* handle, - int blend_type); + BlendMode blend_type); bool ContinueDIBits(CFX_ImageRenderer* handle, PauseIndicatorIface* pPause); bool DrawNormalText(int nChars, @@ -271,7 +271,7 @@ class CFX_RenderDevice { int left, int top, int bitmap_alpha, - int blend_type); + BlendMode blend_type); #endif #if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_ void Flush(bool release); @@ -286,13 +286,15 @@ class CFX_RenderDevice { uint32_t fill_color, uint32_t stroke_color, int fill_mode, - int blend_type); + BlendMode blend_type); bool DrawCosmeticLine(const CFX_PointF& ptMoveTo, const CFX_PointF& ptLineTo, uint32_t color, int fill_mode, - int blend_type); - bool FillRectWithBlend(const FX_RECT& rect, uint32_t color, int blend_type); + BlendMode blend_type); + bool FillRectWithBlend(const FX_RECT& rect, + uint32_t color, + BlendMode blend_type); RetainPtr m_pBitmap; int m_Width; -- cgit v1.2.3