diff options
author | Nicolas Pena <npm@chromium.org> | 2017-04-04 13:38:29 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-04 18:21:06 +0000 |
commit | c3202a95773d7a2c95038ad45c5ba2c9e095e67b (patch) | |
tree | 4742e65e173bbfec56a10b249abee6d9934047bd /core/fxge/win32/fx_win32_print.cpp | |
parent | 6088612c21898eb79cfbde401984176dd94c385c (diff) | |
download | pdfium-c3202a95773d7a2c95038ad45c5ba2c9e095e67b.tar.xz |
Let CPDF_ImageRenderer own the CFX_ImageRenderer
This CL avoids some void* usage and removes CancelDIBits after making a
CPDF_ImageRenderer own its CFX_ImageRenderer.
Bug: pdfium:686
Change-Id: Ied205c57a858cc14d8e2c592db3444ed465b2796
Reviewed-on: https://pdfium-review.googlesource.com/3673
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fxge/win32/fx_win32_print.cpp')
-rw-r--r-- | core/fxge/win32/fx_win32_print.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp index 868c113880..084a136d4d 100644 --- a/core/fxge/win32/fx_win32_print.cpp +++ b/core/fxge/win32/fx_win32_print.cpp @@ -13,6 +13,7 @@ #include "core/fxcrt/fx_system.h" #include "core/fxge/cfx_windowsdevice.h" #include "core/fxge/dib/cfx_dibextractor.h" +#include "core/fxge/dib/cfx_imagerenderer.h" #include "core/fxge/dib/dib_int.h" #include "core/fxge/fx_freetype.h" #include "core/fxge/ge/fx_text_int.h" @@ -164,7 +165,7 @@ bool CGdiPrinterDriver::StartDIBits(const CFX_RetainPtr<CFX_DIBSource>& pSource, uint32_t color, const CFX_Matrix* pMatrix, uint32_t render_flags, - void*& handle, + std::unique_ptr<CFX_ImageRenderer>* handle, int blend_type) { if (bitmap_alpha < 255 || pSource->HasAlpha() || (pSource->IsAlphaMask() && (pSource->GetBPP() != 1))) { @@ -469,7 +470,7 @@ bool CPSPrinterDriver::StartDIBits(const CFX_RetainPtr<CFX_DIBSource>& pBitmap, uint32_t color, const CFX_Matrix* pMatrix, uint32_t render_flags, - void*& handle, + std::unique_ptr<CFX_ImageRenderer>* handle, int blend_type) { if (blend_type != FXDIB_BLEND_NORMAL) return false; @@ -477,7 +478,7 @@ bool CPSPrinterDriver::StartDIBits(const CFX_RetainPtr<CFX_DIBSource>& pBitmap, if (bitmap_alpha < 255) return false; - handle = nullptr; + *handle = nullptr; return m_PSRenderer.DrawDIBits(pBitmap, color, pMatrix, render_flags); } |