diff options
author | Nicolas Pena <npm@chromium.org> | 2017-04-03 13:43:52 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-03 18:10:25 +0000 |
commit | 0c972ebccb8c5f250122955780bd632ff5c8630f (patch) | |
tree | a18c231aeb029572c9c965a0728c00bd273df2db /core/fxge/dib/cfx_bitmapstorer.h | |
parent | 72c6b181862ada8adf485ab8015120df32d9f600 (diff) | |
download | pdfium-0c972ebccb8c5f250122955780bd632ff5c8630f.tar.xz |
Split fx_dib part 5
Move more classes into their own files.
Change-Id: Ic505be9e406eafb378235216ea19221ce172f32e
Reviewed-on: https://pdfium-review.googlesource.com/3593
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/dib/cfx_bitmapstorer.h')
-rw-r--r-- | core/fxge/dib/cfx_bitmapstorer.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/core/fxge/dib/cfx_bitmapstorer.h b/core/fxge/dib/cfx_bitmapstorer.h new file mode 100644 index 0000000000..478d9f7f64 --- /dev/null +++ b/core/fxge/dib/cfx_bitmapstorer.h @@ -0,0 +1,41 @@ +// Copyright 2017 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXGE_DIB_CFX_BITMAPSTORER_H_ +#define CORE_FXGE_DIB_CFX_BITMAPSTORER_H_ + +#include <memory> +#include <vector> + +#include "core/fxcrt/cfx_retain_ptr.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxge/dib/cfx_dibitmap.h" +#include "core/fxge/fx_dib.h" +#include "third_party/base/stl_util.h" + +class CFX_BitmapStorer : public IFX_ScanlineComposer { + public: + CFX_BitmapStorer(); + ~CFX_BitmapStorer() override; + + // IFX_ScanlineComposer + void ComposeScanline(int line, + const uint8_t* scanline, + const uint8_t* scan_extra_alpha) override; + bool SetInfo(int width, + int height, + FXDIB_Format src_format, + uint32_t* pSrcPalette) override; + + CFX_RetainPtr<CFX_DIBitmap> GetBitmap() { return m_pBitmap; } + CFX_RetainPtr<CFX_DIBitmap> Detach(); + void Replace(CFX_RetainPtr<CFX_DIBitmap>&& pBitmap); + + private: + CFX_RetainPtr<CFX_DIBitmap> m_pBitmap; +}; + +#endif // CORE_FXGE_DIB_CFX_BITMAPSTORER_H_ |