diff options
author | tsepez <tsepez@chromium.org> | 2016-06-08 11:51:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-08 11:51:23 -0700 |
commit | 7d2a8d966643ebc77c1aa0f0c53a0ffd2d681c4c (patch) | |
tree | 5f2823bb9e2a575e39044ebea114f4ed4e5a9368 /core/fxge | |
parent | b7a5179a7cd73d33355e1cece763caf238b7dc22 (diff) | |
download | pdfium-7d2a8d966643ebc77c1aa0f0c53a0ffd2d681c4c.tar.xz |
Remove implicit CFX_CountedRef::operator T*()
Explicitly invoke GetObject() method instead. This avoids
having code where it looks like non-pointers are assigned to
pointers but works due to the cast operator.
Review-Url: https://codereview.chromium.org/2045083003
Diffstat (limited to 'core/fxge')
-rw-r--r-- | core/fxge/agg/fx_agg_driver.cpp | 6 | ||||
-rw-r--r-- | core/fxge/apple/fx_apple_platform.cpp | 2 | ||||
-rw-r--r-- | core/fxge/dib/fx_dib_composite.cpp | 6 | ||||
-rw-r--r-- | core/fxge/ge/fx_ge_path.cpp | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp index d7a9ddb530..7d197f8c21 100644 --- a/core/fxge/agg/fx_agg_driver.cpp +++ b/core/fxge/agg/fx_agg_driver.cpp @@ -1096,7 +1096,7 @@ class CFX_Renderer { } m_pClipMask = nullptr; if (m_pClipRgn && m_pClipRgn->GetType() == CFX_ClipRgn::MaskF) { - m_pClipMask = m_pClipRgn->GetMask(); + m_pClipMask = m_pClipRgn->GetMask().GetObject(); } m_bFullCover = bFullCover; FX_BOOL bObjectCMYK = FXGETFLAG_COLORTYPE(alpha_flag); @@ -1562,7 +1562,7 @@ FX_BOOL CFX_AggDeviceDriver::SetPixel(int x, return _DibSetPixel(m_pBitmap, x, y, color, alpha_flag, pIccTransform); } } else if (m_pClipRgn->GetType() == CFX_ClipRgn::MaskF) { - const CFX_DIBitmap* pMask = m_pClipRgn->GetMask(); + const CFX_DIBitmap* pMask = m_pClipRgn->GetMask().GetObject(); FX_BOOL bCMYK = FXGETFLAG_COLORTYPE(alpha_flag); int new_alpha = bCMYK ? FXGETFLAG_ALPHA_FILL(alpha_flag) : FXARGB_A(color); @@ -1617,7 +1617,7 @@ FX_BOOL CFX_AggDeviceDriver::FillRect(const FX_RECT* pRect, } m_pBitmap->CompositeMask( draw_rect.left, draw_rect.top, draw_rect.Width(), draw_rect.Height(), - (const CFX_DIBitmap*)m_pClipRgn->GetMask(), fill_color, + m_pClipRgn->GetMask().GetObject(), fill_color, draw_rect.left - clip_rect.left, draw_rect.top - clip_rect.top, FXDIB_BLEND_NORMAL, nullptr, m_bRgbByteOrder, alpha_flag, pIccTransform); return TRUE; diff --git a/core/fxge/apple/fx_apple_platform.cpp b/core/fxge/apple/fx_apple_platform.cpp index b25bb5875d..4204e7e6a5 100644 --- a/core/fxge/apple/fx_apple_platform.cpp +++ b/core/fxge/apple/fx_apple_platform.cpp @@ -138,7 +138,7 @@ FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars, rect_cg = CGRectMake(m_pClipRgn->GetBox().left, m_pClipRgn->GetBox().top, m_pClipRgn->GetBox().Width(), m_pClipRgn->GetBox().Height()); - const CFX_DIBitmap* pClipMask = m_pClipRgn->GetMask(); + const CFX_DIBitmap* pClipMask = m_pClipRgn->GetMask().GetObject(); if (pClipMask) { CGDataProviderRef pClipMaskDataProvider = CGDataProviderCreateWithData( nullptr, pClipMask->GetBuffer(), diff --git a/core/fxge/dib/fx_dib_composite.cpp b/core/fxge/dib/fx_dib_composite.cpp index 28f6e49044..afb0551b98 100644 --- a/core/fxge/dib/fx_dib_composite.cpp +++ b/core/fxge/dib/fx_dib_composite.cpp @@ -4508,7 +4508,7 @@ FX_BOOL CFX_DIBitmap::CompositeBitmap(int dest_left, FX_RECT clip_box; if (pClipRgn && pClipRgn->GetType() != CFX_ClipRgn::RectI) { ASSERT(pClipRgn->GetType() == CFX_ClipRgn::MaskF); - pClipMask = pClipRgn->GetMask(); + pClipMask = pClipRgn->GetMask().GetObject(); clip_box = pClipRgn->GetBox(); } CFX_ScanlineCompositor compositor; @@ -4587,7 +4587,7 @@ FX_BOOL CFX_DIBitmap::CompositeMask(int dest_left, FX_RECT clip_box; if (pClipRgn && pClipRgn->GetType() != CFX_ClipRgn::RectI) { ASSERT(pClipRgn->GetType() == CFX_ClipRgn::MaskF); - pClipMask = pClipRgn->GetMask(); + pClipMask = pClipRgn->GetMask().GetObject(); clip_box = pClipRgn->GetBox(); } int src_bpp = pMask->GetBPP(); @@ -4870,7 +4870,7 @@ void CFX_BitmapComposer::Compose(CFX_DIBitmap* pDest, m_MaskColor = mask_color; m_pClipMask = nullptr; if (pClipRgn && pClipRgn->GetType() != CFX_ClipRgn::RectI) { - m_pClipMask = pClipRgn->GetMask(); + m_pClipMask = pClipRgn->GetMask().GetObject(); } m_bVertical = bVertical; m_bFlipX = bFlipX; diff --git a/core/fxge/ge/fx_ge_path.cpp b/core/fxge/ge/fx_ge_path.cpp index 2abc45f499..6eb41d3094 100644 --- a/core/fxge/ge/fx_ge_path.cpp +++ b/core/fxge/ge/fx_ge_path.cpp @@ -42,7 +42,7 @@ void CFX_ClipRgn::IntersectRect(const FX_RECT& rect) { void CFX_ClipRgn::IntersectMaskRect(FX_RECT rect, FX_RECT mask_rect, CFX_DIBitmapRef Mask) { - const CFX_DIBitmap* mask_dib = Mask; + const CFX_DIBitmap* mask_dib = Mask.GetObject(); m_Type = MaskF; m_Box = rect; m_Box.Intersect(mask_rect); @@ -70,7 +70,7 @@ void CFX_ClipRgn::IntersectMaskRect(FX_RECT rect, } } void CFX_ClipRgn::IntersectMaskF(int left, int top, CFX_DIBitmapRef Mask) { - const CFX_DIBitmap* mask_dib = Mask; + const CFX_DIBitmap* mask_dib = Mask.GetObject(); ASSERT(mask_dib->GetFormat() == FXDIB_8bppMask); FX_RECT mask_box(left, top, left + mask_dib->GetWidth(), top + mask_dib->GetHeight()); @@ -93,7 +93,7 @@ void CFX_ClipRgn::IntersectMaskF(int left, int top, CFX_DIBitmapRef Mask) { return; } new_dib->Create(new_box.Width(), new_box.Height(), FXDIB_8bppMask); - const CFX_DIBitmap* old_dib = m_Mask; + const CFX_DIBitmap* old_dib = m_Mask.GetObject(); for (int row = new_box.top; row < new_box.bottom; row++) { uint8_t* old_scan = old_dib->GetBuffer() + (row - m_Box.top) * old_dib->GetPitch(); |