From 0c972ebccb8c5f250122955780bd632ff5c8630f Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Mon, 3 Apr 2017 13:43:52 -0400 Subject: Split fx_dib part 5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move more classes into their own files. Change-Id: Ic505be9e406eafb378235216ea19221ce172f32e Reviewed-on: https://pdfium-review.googlesource.com/3593 Commit-Queue: Nicolás Peña Reviewed-by: dsinclair --- core/fxge/dib/fx_dib_main.cpp | 46 ------------------------------------------- 1 file changed, 46 deletions(-) (limited to 'core/fxge/dib/fx_dib_main.cpp') diff --git a/core/fxge/dib/fx_dib_main.cpp b/core/fxge/dib/fx_dib_main.cpp index f3716c36b1..1214cc1f16 100644 --- a/core/fxge/dib/fx_dib_main.cpp +++ b/core/fxge/dib/fx_dib_main.cpp @@ -96,49 +96,3 @@ uint32_t ArgbEncode(int a, FX_COLORREF rgb) { return FXARGB_MAKE(a, FXSYS_GetRValue(rgb), FXSYS_GetGValue(rgb), FXSYS_GetBValue(rgb)); } - -CFX_BitmapStorer::CFX_BitmapStorer() { -} - -CFX_BitmapStorer::~CFX_BitmapStorer() { -} - -CFX_RetainPtr CFX_BitmapStorer::Detach() { - return std::move(m_pBitmap); -} - -void CFX_BitmapStorer::Replace(CFX_RetainPtr&& pBitmap) { - m_pBitmap = std::move(pBitmap); -} - -void CFX_BitmapStorer::ComposeScanline(int line, - const uint8_t* scanline, - const uint8_t* scan_extra_alpha) { - uint8_t* dest_buf = const_cast(m_pBitmap->GetScanline(line)); - uint8_t* dest_alpha_buf = - m_pBitmap->m_pAlphaMask - ? const_cast(m_pBitmap->m_pAlphaMask->GetScanline(line)) - : nullptr; - if (dest_buf) - FXSYS_memcpy(dest_buf, scanline, m_pBitmap->GetPitch()); - - if (dest_alpha_buf) { - FXSYS_memcpy(dest_alpha_buf, scan_extra_alpha, - m_pBitmap->m_pAlphaMask->GetPitch()); - } -} - -bool CFX_BitmapStorer::SetInfo(int width, - int height, - FXDIB_Format src_format, - uint32_t* pSrcPalette) { - auto pBitmap = pdfium::MakeRetain(); - if (!pBitmap->Create(width, height, src_format)) - return false; - - if (pSrcPalette) - pBitmap->SetPalette(pSrcPalette); - - m_pBitmap = std::move(pBitmap); - return true; -} -- cgit v1.2.3