diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-24 21:55:46 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-24 21:55:46 +0000 |
commit | e6ff2ebfaa19421c8d932f4d275548156ae2e13c (patch) | |
tree | a549775ce9d4e999f8a23542524adba8c5ca42ea /core/fxge/skia | |
parent | 16d18d935d055b74e05f615c0325318a329a7fe1 (diff) | |
download | pdfium-e6ff2ebfaa19421c8d932f4d275548156ae2e13c.tar.xz |
Rename CFX_DIBSource to CFX_DIBBase.
It is not a source from which you can get CFX_DIBs, but rather a
base class from which all DIBs inherit.
Do the same thing for the CPDF_DIBSource wrapper class.
Mechanical change apart from adding a one-line comment in cfx_dibbase.h
Change-Id: Id2bde87813ca301d9fafc55ce08d703dfc6a7184
Reviewed-on: https://pdfium-review.googlesource.com/41352
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/skia')
-rw-r--r-- | core/fxge/skia/fx_skia_device.cpp | 41 | ||||
-rw-r--r-- | core/fxge/skia/fx_skia_device.h | 14 |
2 files changed, 27 insertions, 28 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index 0b96cdca5f..db181003ed 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -60,7 +60,7 @@ void RgbByteOrderTransferBitmap(const RetainPtr<CFX_DIBitmap>& pBitmap, int dest_top, int width, int height, - const RetainPtr<CFX_DIBSource>& pSrcBitmap, + const RetainPtr<CFX_DIBBase>& pSrcBitmap, int src_left, int src_top) { if (!pBitmap) @@ -566,7 +566,7 @@ void SetBitmapPaint(bool isAlphaMask, paint->setAlpha(bitmap_alpha); } -bool Upsample(const RetainPtr<CFX_DIBSource>& pSource, +bool Upsample(const RetainPtr<CFX_DIBBase>& pSource, std::unique_ptr<uint8_t, FxFreeDeleter>& dst8Storage, std::unique_ptr<uint32_t, FxFreeDeleter>& dst32Storage, SkBitmap* skBitmap, @@ -2256,7 +2256,7 @@ RetainPtr<CFX_DIBitmap> CFX_SkiaDeviceDriver::GetBackDrop() { return m_pBackdropBitmap; } -bool CFX_SkiaDeviceDriver::SetDIBits(const RetainPtr<CFX_DIBSource>& pBitmap, +bool CFX_SkiaDeviceDriver::SetDIBits(const RetainPtr<CFX_DIBBase>& pBitmap, uint32_t argb, const FX_RECT* pSrcRect, int left, @@ -2286,16 +2286,15 @@ bool CFX_SkiaDeviceDriver::SetDIBits(const RetainPtr<CFX_DIBSource>& pBitmap, #endif // _SKIA_SUPPORT_PATHS_ } -bool CFX_SkiaDeviceDriver::StretchDIBits( - const RetainPtr<CFX_DIBSource>& pSource, - uint32_t argb, - int dest_left, - int dest_top, - int dest_width, - int dest_height, - const FX_RECT* pClipRect, - uint32_t flags, - int blend_type) { +bool CFX_SkiaDeviceDriver::StretchDIBits(const RetainPtr<CFX_DIBBase>& pSource, + uint32_t argb, + int dest_left, + int dest_top, + int dest_width, + int dest_height, + const FX_RECT* pClipRect, + uint32_t flags, + int blend_type) { #ifdef _SKIA_SUPPORT_ m_pCache->FlushForDraw(); if (!m_pBitmap->GetBuffer()) @@ -2339,7 +2338,7 @@ bool CFX_SkiaDeviceDriver::StretchDIBits( } bool CFX_SkiaDeviceDriver::StartDIBits( - const RetainPtr<CFX_DIBSource>& pSource, + const RetainPtr<CFX_DIBBase>& pSource, int bitmap_alpha, uint32_t argb, const CFX_Matrix* pMatrix, @@ -2472,8 +2471,8 @@ void CFX_DIBitmap::UnPreMultiply() { #ifdef _SKIA_SUPPORT_ bool CFX_SkiaDeviceDriver::DrawBitsWithMask( - const RetainPtr<CFX_DIBSource>& pSource, - const RetainPtr<CFX_DIBSource>& pMask, + const RetainPtr<CFX_DIBBase>& pSource, + const RetainPtr<CFX_DIBBase>& pMask, int bitmap_alpha, const CFX_Matrix* pMatrix, int blend_type) { @@ -2513,8 +2512,8 @@ bool CFX_SkiaDeviceDriver::DrawBitsWithMask( } bool CFX_SkiaDeviceDriver::SetBitsWithMask( - const RetainPtr<CFX_DIBSource>& pBitmap, - const RetainPtr<CFX_DIBSource>& pMask, + const RetainPtr<CFX_DIBBase>& pBitmap, + const RetainPtr<CFX_DIBBase>& pMask, int dest_left, int dest_top, int bitmap_alpha, @@ -2614,8 +2613,8 @@ void CFX_DefaultRenderDevice::DebugVerifyBitmapIsPreMultiplied() const { } bool CFX_DefaultRenderDevice::SetBitsWithMask( - const RetainPtr<CFX_DIBSource>& pBitmap, - const RetainPtr<CFX_DIBSource>& pMask, + const RetainPtr<CFX_DIBBase>& pBitmap, + const RetainPtr<CFX_DIBBase>& pMask, int left, int top, int bitmap_alpha, @@ -2629,7 +2628,7 @@ bool CFX_DefaultRenderDevice::SetBitsWithMask( } #endif // _SKIA_SUPPORT_ -void CFX_DIBSource::DebugVerifyBitmapIsPreMultiplied(void* opt) const { +void CFX_DIBBase::DebugVerifyBitmapIsPreMultiplied(void* opt) const { #ifdef SK_DEBUG SkASSERT(32 == GetBPP()); const uint32_t* buffer = (const uint32_t*)(opt ? opt : GetBuffer()); diff --git a/core/fxge/skia/fx_skia_device.h b/core/fxge/skia/fx_skia_device.h index 692199f6bb..ce6ca6b000 100644 --- a/core/fxge/skia/fx_skia_device.h +++ b/core/fxge/skia/fx_skia_device.h @@ -83,15 +83,15 @@ class CFX_SkiaDeviceDriver : public RenderDeviceDriverIface { RetainPtr<CFX_DIBitmap> GetBackDrop() override; - bool SetDIBits(const RetainPtr<CFX_DIBSource>& pBitmap, + bool SetDIBits(const RetainPtr<CFX_DIBBase>& pBitmap, uint32_t color, const FX_RECT* pSrcRect, int dest_left, int dest_top, int blend_type) override; #ifdef _SKIA_SUPPORT_ - bool SetBitsWithMask(const RetainPtr<CFX_DIBSource>& pBitmap, - const RetainPtr<CFX_DIBSource>& pMask, + bool SetBitsWithMask(const RetainPtr<CFX_DIBBase>& pBitmap, + const RetainPtr<CFX_DIBBase>& pMask, int dest_left, int dest_top, int bitmap_alpha, @@ -102,7 +102,7 @@ class CFX_SkiaDeviceDriver : public RenderDeviceDriverIface { void SetClipMask(const FX_RECT& clipBox, const SkPath& skClipPath); #endif - bool StretchDIBits(const RetainPtr<CFX_DIBSource>& pBitmap, + bool StretchDIBits(const RetainPtr<CFX_DIBBase>& pBitmap, uint32_t color, int dest_left, int dest_top, @@ -112,7 +112,7 @@ class CFX_SkiaDeviceDriver : public RenderDeviceDriverIface { uint32_t flags, int blend_type) override; - bool StartDIBits(const RetainPtr<CFX_DIBSource>& pBitmap, + bool StartDIBits(const RetainPtr<CFX_DIBBase>& pBitmap, int bitmap_alpha, uint32_t color, const CFX_Matrix* pMatrix, @@ -123,8 +123,8 @@ class CFX_SkiaDeviceDriver : public RenderDeviceDriverIface { bool ContinueDIBits(CFX_ImageRenderer* handle, PauseIndicatorIface* pPause) override; - bool DrawBitsWithMask(const RetainPtr<CFX_DIBSource>& pBitmap, - const RetainPtr<CFX_DIBSource>& pMask, + bool DrawBitsWithMask(const RetainPtr<CFX_DIBBase>& pBitmap, + const RetainPtr<CFX_DIBBase>& pMask, int bitmap_alpha, const CFX_Matrix* pMatrix, int blend_type); |